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
10
votes
2 answers

How can you refresh all regions in Beaker cache in Pyramid?

I am trying to setup caching on a web server I have built using Pyramid. I am using pyramid_beaker, which creates a back-end to use Beaker for caching. I have been using cached region decorators to implement the caching. A sample cached region…
user1474424
  • 657
  • 1
  • 5
  • 18
9
votes
1 answer

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.
user90150
8
votes
2 answers

Caching database data in python

In the project I need to cache the database data fetched from each request.So that from next time onwards the data(table rows) will be picked from cache instead of db thereby improving performance.In DB i have more than 10M data rows. I was going…
Kratos85
  • 183
  • 2
  • 5
7
votes
1 answer

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

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…
TylerW
  • 1,443
  • 2
  • 13
  • 25
7
votes
1 answer

Should I configure Beaker's `session.lock_dir` when using Memcache on Heroku?

I am switching a Pyramid application's session configuration from cookie to ext:memcached. My application is hosted on Heroku and I have configured their memcache addon as per their documentation. I understand from the Beaker documentation that…
thruflo
  • 668
  • 1
  • 7
  • 9
6
votes
1 answer

Difference between database and sqla backends in Beaker?

It looks like Beaker supports two database backends, ext:database and ext:sqla, but what is the difference between them?
Joril
  • 19,961
  • 13
  • 71
  • 88
6
votes
1 answer

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).
Paul Biggar
  • 27,579
  • 21
  • 99
  • 152
6
votes
1 answer

Using Flask Session in Gevent Socket-IO

Good Morning, I have been having some trouble and I am hoping some one will be able to help me out a bit here. What I am trying to do is access the Flask Session within a Gevent Socket-IO Name space. I have tried to use beaker as a middle ware…
Recursive
  • 103
  • 2
  • 6
5
votes
1 answer

Bottle.py session with Beaker

first time questioner here. I'm currently struggling on how to use Beaker properly using the Bottle micro-framework. Here's the problematic program: #!/usr/bin/python # -*- coding: utf-8 -*- # filename: server.py import bottle as app from…
user642922
4
votes
1 answer

Beaker as session middleware

I'm writing an app using bottle.py and beaker.middleware.SessionMiddleware: How can I modify the session.timeout and session.cookie_expires values so I can implement a login system that logs the user in for 30 days? I already implemented the…
Paul
  • 20,883
  • 7
  • 57
  • 74
4
votes
1 answer

How to use beaker session in bottle micro framework?

When I try to assign something to the session dictionary using beaker, I get the following error: Traceback (most recent call last): rv = callback(*a, **ka) File "controllers.py", line 30, in login s['email'] = email TypeError: 'NoneType'…
hllau
  • 9,879
  • 7
  • 30
  • 35
4
votes
1 answer

Pyramid beaker accessing Sessions that have been created

I am trying to use pyramid beaker in Pyramid framework and its just not working it creates the session objects but i cannot access them with the line @view_config(route_name='load_qli', renderer='json') def load_qli(request): …
Madawar
  • 507
  • 1
  • 9
  • 26
4
votes
1 answer

Beaker caching performance guideline

I was implemented beaker with a cherrypy application, but after some requests, the beaker response time increases about 10-14 seconds. i think after including 500 to 1000 items in cache, beaker goes down. all cached types are…
pylover
  • 7,670
  • 8
  • 51
  • 73
4
votes
1 answer

Conditionally disable caching decorator based on instance variable

I want to cache certain methods of a class - but only if a read_only flag is set on the instance of the class. So, in the object below, I want the get() method to be cacheable, but only if self.readonly is True. I can't conditionally use the…
ʞɔıu
  • 47,148
  • 35
  • 106
  • 149
3
votes
2 answers

python try except does not capture all errors

In my flask web application I use beaker library for session handling. In the following code, for some unknown reason, production server raises exception, but my local pc does just fine. import sys ... try: beaker_session =…
synergetic
  • 7,756
  • 8
  • 65
  • 106
1
2 3 4 5 6 7 8