Questions tagged [beaker]

Beaker is a library for caching and sessions for use with web applications and stand-alone Python scripts and applications. It comes with WSGI middleware for easy drop-in use with WSGI based web applications, and caching decorators for ease of use with any Python based application.

Beaker is a library for caching and sessions for use with web applications and stand-alone Python scripts and applications. It comes with WSGI middleware for easy drop-in use with WSGI based web applications, and caching decorators for ease of use with any Python based application.

For more information, read the documentation at: https://beaker.readthedocs.io/en/latest/index.html


Beaker is also the name of a full-stack software and hardware integration testing system, with the ability to manage a globally distributed network of test labs. Use the beaker-testing tag instead of this tag for questions about Beaker the testing system.

114 questions
2
votes
0 answers

Cookie-Only Sessions Pros/Cons/Summary

Beaker offers an option to use encrypted cookie-only sessions. These sessions are encrypted in such a way that allegedly the user cannot view or modify the information inside the cookie. The documentation discusses these in little details, and I…
Kevin Dolan
  • 4,952
  • 3
  • 35
  • 47
2
votes
1 answer

How invalidate beaker_cache in Pylons?

Need to invalidate a cache created by beaker_cache decorator for a specific controller action: from pylons.decorators.cache import beaker_cache class SampleController(BaseController): @beaker_cache() def home(self): c.data =…
antazy
  • 23
  • 5
2
votes
1 answer

How to make invalidating Beaker cache work?

I have a function which is decorated with beaker cache decorator. The function is located in a module from which it is imported into the main app. from caching import cache, my_cached_function Now, in one function I used the decorated function: def…
user234932
2
votes
1 answer

Puppet + Beaker + Travis: acceptance test failing

I A have a Puppet module with acceptance tests based on Beaker. The module is working fine and when running locally all the acceptance tests run fine. But when I run the tests on Travis I got the following error in the module execution:…
NicoPaez
  • 426
  • 2
  • 12
2
votes
1 answer

Pyramid beaker - is there a way to create an endpoint that doesn't update the session timestamp?

In attempting to implement automatic logout on the browser-side after 30 seconds of inactivity, we thought of creating a /heartbeat endpoint: when the user moves the mouse or types any key, a javascript callback is scheduled after 10 seconds, to…
ttsiodras
  • 10,602
  • 6
  • 55
  • 71
2
votes
1 answer

In Pyramid, how can prevent cookies from being set in certain responses?

In Pyramid, using beaker for sessions, how can I make it so certain responses do not include cookies? Currently if I curl any url on my app I'll get back something like: HTTP/1.1 200 OK Server: nginx/1.2.6 Date: Thu, 07 Nov 2013 02:14:45…
jchysk
  • 1,538
  • 1
  • 15
  • 27
2
votes
0 answers

[python][beaker]How to make cache dependency?

My web app serves a markdown convert for a directory, say that: file = 'foo.md' html = parse_markdown_file(file) render_to_response(html) Now I want to cache html result for each file, I can do it with Beaker. However, I want to invalidate the…
Tarzan
  • 529
  • 3
  • 14
2
votes
1 answer

Caching with beaker

I have a program that scrapes a website for data. I want to be able to cache that data instead of loading it if its only been a few minutes since it was last retrieved. I looked at beaker but I'm extremely new to cache and not sure if this is what…
Wallace
  • 572
  • 3
  • 15
2
votes
1 answer

How should I store login info from Pyramid application? Beaker?

I come from PHP world, and I've just started learning Pyramid framework. Currently I'm trying to figure out whats the best option to store user data. So in PHP I coded a model that utilized php builtin sessions with combination of cookies. Cookies…
if __name__ is None
  • 11,083
  • 17
  • 55
  • 71
2
votes
1 answer

Implementing Sqlalchemy beaker caching in pyramid framework

As per the example provided by sqlalchemy documentation to cache a sqlalchemy query we are suppose to do this from caching_query import FromCache # load Person objects. cache the result under the namespace "all_people". print "loading…
Madawar
  • 507
  • 1
  • 9
  • 26
2
votes
1 answer

pyramid beaker cache issue - TypeError: int() argument must be a string or a number, not 'NoneType'

.ini file cache.regions = default_term, second, short_term, long_term cache.type = memcached cache.url = 127.0.0.1:11211 cache.second.expire = 1 cache.short_term.expire = 60 cache.default_term.expire = 300 cache.long_term.expire = 3600 __init__.py…
Wentworth
  • 199
  • 2
  • 10
2
votes
2 answers

Beaker Session across GET and POST on Google App Engine?

I'm using Beaker Session on Google App Engine to manage persistent data between HTTP requests. Is it possible to access same session from GET and POST request? I tried to get access to session object but they are not the same object: def get(self): …
Seunghoon
  • 5,632
  • 5
  • 35
  • 41
1
vote
1 answer

beaker InvalidCryptoBackendError: No AES library is installed error

HI i get following error for beaker on Mac os x sno leopard 10.6.8 InvalidCryptoBackendError: No AES library is installed, can't generate encrypted cookie-only Session What's the workaround or fix for this?
Ashish
  • 851
  • 12
  • 27
1
vote
1 answer

How to create a child app with parameters in Algorand?

I want to create a child app as described here, but make it to accept parameters on creation: from pyteal import * from beaker import Application, ApplicationStateValue, decorators class ChildApp(Application): foo =…
jeron-diovis
  • 788
  • 1
  • 8
  • 19
1
vote
1 answer

How can one combine pyramid_beaker decorator-style caching and pyramid_tm?

With Pyramid / pyramid_tm I end up passing around the dbsession object that joined the current transaction to methods that encapsulate my code. For example def get_item_name(dbsession, item_id): item = dbsession.query(...) return…
barbaz
  • 1,642
  • 2
  • 17
  • 27