[Web-SIG] and now for something completely different!
Chris McDonough
chrism at plope.com
Mon Aug 15 19:25:33 CEST 2005
I've also got reams of code in Zope for sessions.
Maybe we should just wait til the next PyCon and have a consolidation
sprint.
- C
On Mon, 2005-08-15 at 10:17 -0700, Shannon -jj Behrens wrote:
> Heh, I'm overwhelmed by too much code and not enough direction.
> Naturally, I've got nice session code in Aquarium as well. *Sigh*
> this Python Web thing is going to be the death of me!
>
> -jj
>
> On 8/14/05, Titus Brown <titus at caltech.edu> wrote:
> > -> 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:
> > -> http://www.pythonweb.org/projects/webmodules/doc/0.5.3/html_multipage/lib/session.html
> > ->
> > -> 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:
> >
> > http://cafepy.com/quixote_extras/titus/session2/session2/store/SessionStore.py
> >
> > With the comments deleted, here's the core API:
> >
> > class SessionStore:
> > def load_session(self, id, default=None):
> > pass
> >
> > def save_session(self, session):
> > pass
> >
> > def delete_session(self, session):
> > pass
> >
> > 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.
> >
> > cheers,
> > --titus
> > _______________________________________________
> > Web-SIG mailing list
> > Web-SIG at python.org
> > Web SIG: http://www.python.org/sigs/web-sig
> > Unsubscribe: http://mail.python.org/mailman/options/web-sig/jjinux%40gmail.com
> >
>
>
More information about the Web-SIG
mailing list