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
3
votes
1 answer

Pyramid with memcached: how to make it work? Error - MissingCacheParameter: url is required

I have site on Pyramid framework and want to cache with memcached. For testing reasons I've used memory type caching and everything was OK. I'm using pyramid_beaker package. Here is my previous code (working version). In .ini file cache.regions =…
Vitalii Ponomar
  • 10,686
  • 20
  • 60
  • 88
3
votes
1 answer

How do I save values to an anonymous cookie based session in Pyramid using Beaker

I have a Pyramid application using Beaker Encrypted cookie sessions. I can log a user in using a RequestWithUserAttribute, pyramid.security.authenticated_userid(), remember() and forget() just fine. However, the majority of users will never log in,…
3
votes
2 answers

How do I override the default session timeout with pyramid + pyramid-beaker + beaker

I am using pyramid to create a web application. I am then using pyramid-beaker to interface beaker into pyramid's session management system. Two values affect the duration of a user's session. The session cookie timeout The actual session's life…
Andrew Martinez
  • 3,714
  • 3
  • 35
  • 38
3
votes
2 answers

Getting Beaker working with GAE

I'm trying to port an app I've been running locally to GAE. The app uses the Bottle.py framework. I use Beaker for session management. I'm a bit of a noob and am having trouble getting Beaker imported properly. Help greatly appreciated. I'm…
mscantland
  • 31
  • 1
3
votes
1 answer

What's wrong with my code? WSGI, beaker, python, apache2

I'm using apache2, python26, more or less latest version of beaker, mod_wsgi Here's my code, I got this from http://beaker.groovie.org/sessions.html#using from beaker.middleware import SessionMiddleware def simple_app(environ, start_response): …
Derek
  • 151
  • 1
  • 5
3
votes
0 answers

Python module path (relative in flask, absolute in celery)

I am using beaker cache to cache the output of a function. When I invalidate the cache from flask uwsgi app, it did not reflect in celery app and vice versa. On further investigation found that beaker using inspect.getsourcefile(func) for unique key…
MavWolverine
  • 846
  • 1
  • 9
  • 24
3
votes
1 answer

Test if a function/region is cached in Beaker/Dogpile

Using the python modules Beaker or Dogpile for caching, is it possible to test if a region with a particular key value is already present in the cache or not?
drarmstr
  • 680
  • 1
  • 8
  • 16
3
votes
1 answer

Memcached-based beaker sessions not initializing on Zope start

We're using memcached-based beaker sessions for a distributed Plone/Zope setup. The same setup works fine in our pre-prod environments but when we move to prod, we can't seem to get it to connect to memcached on 11211. I've run tcpdump on the…
Spanky
  • 5,608
  • 10
  • 39
  • 45
3
votes
1 answer

How to use beaker without install it?

Beaker is not a part of python standard library, and I want to make my application has no dependencies rather than the python standard library itself. To accomplish this, I download beaker and extract as a sub-package of my application. Then, I use…
goFrendiAsgard
  • 4,016
  • 8
  • 38
  • 64
3
votes
1 answer

(Session) authentication in a pyramids web application

I am working on a python web application based on the pyramid framework. I am trying to add session authentication to it. By that I understand that: users can log in/out (security is desirable); user data are kept in a database authentication is…
Malhelo
  • 399
  • 6
  • 16
3
votes
1 answer

How to remove old beaker sessions from memcached?

According to the beaker documentation: Beaker does not automatically delete expired or old cookies on any of its back-ends. This task is left up to the developer based on how sessions are being used, and on what back-end. Using mcinspect I've…
Phillip B Oldham
  • 18,807
  • 20
  • 94
  • 134
2
votes
1 answer

Pyramid_beaker: session.type = cookie is not secure?

I've launched my site few days ago on Pyramid framework and I've choosed session.type = cookie with pyramid_beaker in perfomance reasons. So in cookie I have encrypted user_id, it's look like this: usr:…
Vitalii Ponomar
  • 10,686
  • 20
  • 60
  • 88
2
votes
1 answer

Why are so many Beaker sessions saved in CKAN?

With CKAN, a new Beaker session is saved with each page load, AJAX request, and Flash message popup. Is it really necessary to save so many sessions. Forgive my ignorance but I don't think I fully understand the benefit especially as it steadily…
Dan
  • 21
  • 1
2
votes
1 answer

How to use beaker with GAE

Hi I'm going to use an own session object and I'm trying to apply beaker with python. Can you tell me how to use it with google app engine? I've got the following code and then I'm unsure how to proceed: session_opts = { …
Niklas Rosencrantz
  • 25,640
  • 75
  • 229
  • 424
2
votes
0 answers

What's wrong with my Beaker, WSGI, Apache2, Python?

Okay so my code is below. I'm working with apache2, mod_wsgi, beaker, python def application(environ, start_response): session = environ['beaker.session'] if not session.has_key('value'): session['value'] = 0 session.save() …
Derek
  • 151
  • 1
  • 5