MySQLdb Sessions

2 views
Skip to first unread message

Ken

unread,
Dec 29, 2008, 7:11:56 PM12/29/08
to cherrypy-devel
I developed a class for storing sessions in a MySQL database. It keeps
one database connection per thread, using thread.local. I put it up on
my blog, but how should I go about in having it added to CherryPy in
some way so other users can benefit from it?

Here's the code:

http://kenkinder.com/2008/12/29/mysql-mysqldb-sessions-on-cherrypy/
http://kenkinder.com/wp-content/uploads/2008/12/mysqlsession.py.zip

(It's zipped because my stupid hosting company can't serve .py files
as static content -- go figure).

I'm assuming this is useful to others. How should I get it included in
CherryPy?

Robert Brewer

unread,
Dec 29, 2008, 7:55:44 PM12/29/08
to cherryp...@googlegroups.com
Ken wrote:
> I developed a class for storing sessions in a MySQL database. It keeps
> one database connection per thread, using thread.local. I put it up on
> my blog, but how should I go about in having it added to CherryPy in
> some way so other users can benefit from it?
>
> Here's the code:
>
> http://kenkinder.com/2008/12/29/mysql-mysqldb-sessions-on-cherrypy/
> http://kenkinder.com/wp-content/uploads/2008/12/mysqlsession.py.zip

It looks pretty good to me. The next step would be either:

1) Make a ticket and attach your code, or
2) Paste your code somewhere on http://tools.cherrypy.org

...both approaches designed to give it some time for community comments.


Robert Brewer
fuma...@aminus.org

Robert Brewer

unread,
Dec 29, 2008, 8:00:55 PM12/29/08
to cherryp...@googlegroups.com
> Ken wrote:
> > I developed a class for storing sessions in a MySQL database.
> > It keeps one database connection per thread, using thread.local.
> > I put it up on my blog, but how should I go about in having it
> > added to CherryPy in some way so other users can benefit from it?
> >
> > Here's the code:
> >
> > http://kenkinder.com/2008/12/29/mysql-mysqldb-sessions-on-cherrypy/
> > http://kenkinder.com/wp-content/uploads/2008/12/mysqlsession.py.zip

and I replied:


> It looks pretty good to me. The next step would be either:
>
> 1) Make a ticket and attach your code, or
> 2) Paste your code somewhere on http://tools.cherrypy.org
>
> ...both approaches designed to give it some time for community
> comments.

...but I forgot to say "thanks!" :) This is a great contribution I've
been hoping for for some time.


Robert Brewer
fuma...@aminus.org

Reply all
Reply to author
Forward
0 new messages