Skip to main content

A Beaker extension to show the active sessions

Project description

BeakerShowSessions is a Beaker extension that shows the active sessions according to the given WSGI configuration file. Currently the plugin only works with ext:database session storage backend.

You could call get_sessions in order to get a list of active sessions (dicts):

>>> from beaker.scripts import get_sessions
>>> get_sessions('cfg/production.ini')

BeakerShowSessions expects to find these keys in the [app:main] section of your configuration file

  • beaker.session.type = ext:database - the only supported backend (yet)

  • beaker.session.url - an SQLAlchemy engine URL

  • beaker.session.timeout - session timeout in seconds

  • beaker.session.table_name - (optional) session storage table. Defaults to beaker_sessions.

If your beaker configuration directive prefix is not beaker.session (or you have multiple beaker instances) you can provide the correct prefix as a second option:

>>> get_sessions('cfg/prod.ini', 'bkr.sess')

If you are going to use BeakerShowSessions separately you could choose to call show_sessions instead. It takes the same parameters but returns a pretty ASCII table with results, like this:

>>> print show_sessions('cfg/prod.ini')
--------------------------------------------------------
     _accessed_time |      _creation_time |    user_name
--------------------------------------------------------
2001-02-03 10:11:12 | 2001-02-03 10:11:12 | john@doe.com

PasteCall provides a convenient method to call show_sessions from the console:

$ paster call beaker.scripts:show_sessions 'cfg/prod.ini' 'bkr.ses'
--------------------------------------------------------
     _accessed_time |      _creation_time |    user_name
--------------------------------------------------------
2001-02-03 10:11:12 | 2001-02-03 10:11:12 | john@doe.com

You can find the Mercurial repository at bitbucket.org

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

BeakerShowSessions-0.1.zip (7.5 kB view details)

Uploaded Source

BeakerShowSessions-0.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distributions

BeakerShowSessions-0.1-py2.6.egg (5.8 kB view details)

Uploaded Source

BeakerShowSessions-0.1-py2.5.egg (5.8 kB view details)

Uploaded Source

File details

Details for the file BeakerShowSessions-0.1.zip.

File metadata

File hashes

Hashes for BeakerShowSessions-0.1.zip
Algorithm Hash digest
SHA256 c64e2e823c21da3d69186b3eaacc1a817892a6e71206913d9ca944586a6b6496
MD5 deca844e5ff3262d11cfee45b682b74d
BLAKE2b-256 69a2bad7344e2dd35ca935edee558b8bfc463e26094d53c7c9c1caa232446b72

See more details on using hashes here.

File details

Details for the file BeakerShowSessions-0.1.tar.gz.

File metadata

File hashes

Hashes for BeakerShowSessions-0.1.tar.gz
Algorithm Hash digest
SHA256 113f7117fc16ea5a01b382f9c7c38337c46e5111db79c8bbd6c5c4d9b076f44f
MD5 4f5b1e669f826c97e7db06bb8ac131f8
BLAKE2b-256 5c724d5889fb6099cc331dde51eeff1a21aa6c08d8bae4b4931d024faa688f91

See more details on using hashes here.

File details

Details for the file BeakerShowSessions-0.1-py2.6.egg.

File metadata

File hashes

Hashes for BeakerShowSessions-0.1-py2.6.egg
Algorithm Hash digest
SHA256 2144567ca6f6979eaee7c31b8d3ecb1b286169c361d45ecadeed3331c2f50cef
MD5 c48cc3567f8fa31f19c10ec298a263f3
BLAKE2b-256 e1493539af3f0d8ce0139c3faa835198db793941b7546b769dd068e4d6bb2c53

See more details on using hashes here.

File details

Details for the file BeakerShowSessions-0.1-py2.5.egg.

File metadata

File hashes

Hashes for BeakerShowSessions-0.1-py2.5.egg
Algorithm Hash digest
SHA256 7328a2f761b4a54aecf7c871eab4ae65778532ee4d7be795b2e26e06f69c4120
MD5 858ecb7d10172524b093d5a010cebe85
BLAKE2b-256 f988a7adf111492b6a984f8c8fad1e103b1d951338e5eb2cc682970c9b61e32f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page