Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

src/x/y/xychan-0.3/xychan/image_store.py   xychan(Download)
from sha import sha
 
from .util import num_encode
 
 
def store_image(image_data):
    sig = sha()
    sig.update(image_data)
    key = num_encode(int(sig.hexdigest(), 16))
    fn = IMAGE_DIR + os.sep + key