Skip to content

Instantly share code, notes, and snippets.

View flibustenet's full-sized avatar
👣
Hello

Wilk flibustenet

👣
Hello
View GitHub Profile
from hashlib import sha256
import os
from pyramid.session import SignedCookieSessionFactory
def make_session_id():
rand = os.urandom(16)
return sha256(sha256(rand).digest()).hexdigest()
class MemorySessionSerializer(object):