code: def hashimage(hashvalue):
      
      tmpf = tempfile.mkstemp(".png")[1]
      image = pagan.Avatar("")
      image.img = pagan.generator.generate_by_hash(hashvalue)
      image.save("/", tmpf)
      return static_file(tmpf, root="/")
docs: generate image by hash, usese tempfile :-/