In an effort to learn about web.py and Google App Engine, I put together this module to implement sessions. It's based on the session module that comes with web.py as well as Yejun's version of App Engine sessions (http://groups.google.com/group/webpy/browse_thread/thread/ cfbba8553817de1f/a0801b15e4fdedaf?lnk=gst&q=gae +sessions#a0801b15e4fdedaf).
This version uses both BigTable and memcache for better performance. It also gives you the option of setting the cookie expires time rather than having the cookie always expire when the browser session ends. I have attempted to somewhat optimize when the module writes to BigTable since writes are much more expensive than reads. I'm pretty new to Python and GAE, so I am sure much here can be improved and outright fixed. To use this module, copy it into the web directory and add the line 'import gsession' to the __init__.py in that directory. Here is gsession.py: http://dpaste.com/hold/107669/ Here is a sample code.py that uses it: http://dpaste.com/hold/107671/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/webpy?hl=en -~----------~----~----~----~------~----~------~--~---
