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_cache.
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
Built Distributions
File details
Details for the file BeakerShowSessions-0.1.2.zip
.
File metadata
- Download URL: BeakerShowSessions-0.1.2.zip
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cff1c5a6019438c19004c7d8a9325fcf7d7636094c4d5e42edd4e8e870446df3 |
|
MD5 | ef5cfaba7e8962fab820116ec597b473 |
|
BLAKE2b-256 | f85c3846152cd81464124b8c9745427d8956d6768f7f3ec49247f6a8370a920e |
File details
Details for the file BeakerShowSessions-0.1.2.tar.gz
.
File metadata
- Download URL: BeakerShowSessions-0.1.2.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22f669a2838e46c658ab35850fded7f0bc64cab9fd0f1a49c9c100ee85210e2b |
|
MD5 | 4a06b760c2d6c7b3767a2ef9b961d8d0 |
|
BLAKE2b-256 | 5d6cf9bc986870cf945e22ea8d52215dba768cce4e6eb7c5d32f87e4d842ca20 |
File details
Details for the file BeakerShowSessions-0.1.2-py2.6.egg
.
File metadata
- Download URL: BeakerShowSessions-0.1.2-py2.6.egg
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71a696493d0f3db55c03d47eaa29dc8f98aa89edff79c4590ad23de4a2dd97d5 |
|
MD5 | 91fb8774acec0ce98cdab2c3cb985a64 |
|
BLAKE2b-256 | c3e8bf4d80c289131948462902eacbb27ba091be1022e49fb59f64bbc853789c |
File details
Details for the file BeakerShowSessions-0.1.2-py2.5.egg
.
File metadata
- Download URL: BeakerShowSessions-0.1.2-py2.5.egg
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10ef9d84425fae97cc091523ea4e095dbb1346413f27490592f2bab529f144fb |
|
MD5 | d4f6dfe188093189173b56eeb47b1e6e |
|
BLAKE2b-256 | 99a31a2041f9f5b912bf59cf8328a38e971139244c4a83ce46fe77c48e5a97e5 |