[Web-SIG] and now for something completely different!
titus at caltech.edu
Sun Aug 14 19:54:25 CEST 2005
-> I think that would be useful. Flup has a fairly decoupled session store
-> (http://www.saddi.com/software/flup/ in
-> http://svn.saddi.com/flup/trunk/flup/middleware/session.py). Is there
-> other current work that should be considered? PythonWeb has a session
-> module, but I don't know what its insides look like:
-> Paste has one too, but it's Not Very Good ;) I started using the flup
-> session, but I got lazy and never flipped the switch to make it the
-> default. There's been some discussion about sessions in the last few
-> months on the Quixote list as well.
I've been decoupled from Web-SIG e-mails for the last two months, but
Mike Orr and I built a simple session store for Quixote that has a
fairly simple and generic storage API:
With the comments deleted, here's the core API:
def load_session(self, id, default=None):
def save_session(self, session):
def delete_session(self, session):
def has_session(self, id):
return self.load_session(id, None)
The only constraint is that 'id' must be a string in order for it to
work with all of the session stores.
We have implemented stores for postgres, durus, mysql, directory/file,
and shelve persistence mechanisms.
More information about the Web-SIG