beaker

Using Beaker on Google App Engine (Django)

How do we use Beaker to implement sessions on Google App Engine? (I say Beaker because gmemsess is short-lived, and therefore not suitable). There seem to be no examples online. We're using Django 1.1 via App Engine Helper (not app-engine-patch). ...

How to start using Beaker in Django

Question: Could people show or point me a complete example or tutorial to start using Beaker in Django? Information: Since I've read about problem in database connection with django orm from here. http://lethain.com/entry/2008/jul/23/replacing-django-s-orm-with-sqlalchemy/ Here is the correct link http://adam.gomaa.us/blog/2007/aug/26...

Is it OK to reconfigure a Beaker cache after import time?

The Beaker cache documentation seems to assume a configured cache at import time for use as a decorator. I would like to defer configuration of the cache until later so its parameters can be loaded from a configuration file. How do I reconfigure the Beaker cache? ...

How do I access session data in Jinja2 templates (Bottle framework on app engine)?

Hello! I'm running the micro framework Bottle on Google App Engine. I'm using Jinja2 for my templates. And I'm using Beaker to handle the sessions. I'm still a pretty big Python newbie and am pretty stoked I got this far :) My question is how do I access the session data within the templates? I can get the session data no problem w...

Are there any concerns I should have about storing a Python Lock object in a Beaker session?

There is a certain page on my website where I want to prevent the same user from visiting it twice in a row. To prevent this, I plan to create a Lock object (from Python's threading library). However, I would need to store that across sessions. Is there anything I should watch out for when trying to store a Lock object in a session (s...

Can I move beaker.SessionMiddleware to handle method somehow?

It's a bit ugly that many lines of code fall into "__main__". Can someone give me a tip of how to move SessionMiddleware into handle method? I should notice that I use session in CoreXmlParser. Thanks in advance ! def handle(environ, start_response): req = webob.Request(environ) c = CoreXmlParser(req) resp = webo...

Can't get Beaker cache working

Hi everyone, I'm trying to use Beaker's caching library but I can't get it working. Here's my test code. class IndexHandler(): @cache.cache('search_func', expire=300) def get_results(self, query): results = get_results(query) return results def get(self, query): results = self.get_results(query) ...

Python: Redis as session backend to Beaker

Anyone had success with using Redis as Beaker backend? Can you tell me link or library how to do it? I am looking for any library which does this but could not get anything out of google search. ...