BeakerShowSessions
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
Metadata
Release files for BeakerShowSessions 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distributions (sdists)
| File | Size | Uploaded | |
|---|---|---|---|
| BeakerShowSessions-0.1.1.zip | 7.6 kB | Details | |
| BeakerShowSessions-0.1.1.tar.gz | 3.3 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| BeakerShowSessions-0.1.1-py2.6.egg | Legacy Egg format | - | - | Details |
| BeakerShowSessions-0.1.1-py2.5.egg | Legacy Egg format | - | - | Details |
Total release size: 22.5 kB
Release files / BeakerShowSessions-0.1.1.zip
| Download URL | BeakerShowSessions-0.1.1.zip |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d678affc866e5eee429d901cc2e2f954c90cf776fb348bd556ff811916d71620
|
|
BLAKE2b-256 checksum How to use checksums |
143663c9dd0280cf353ab3a569293b79da250cfa4cce8caa8c55f5cd9ca47d75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / BeakerShowSessions-0.1.1.tar.gz
| Download URL | BeakerShowSessions-0.1.1.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
492c6945f35e15ea47c9adff12762d2d42c2db49e05ae695d73eef78cf369077
|
|
BLAKE2b-256 checksum How to use checksums |
4f16d70eccddfe7ea0ab53a19d7f272ba2b25a29d01aa9d1c599d1cdb96af0fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / BeakerShowSessions-0.1.1-py2.6.egg
| Download URL | BeakerShowSessions-0.1.1-py2.6.egg |
|---|---|
| Size | 5.8 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
3c34827cfef952c16d7e75325d3b0e0b014700d247c2ae73c7b67f392b772684
|
|
BLAKE2b-256 checksum How to use checksums |
3005508d4fe7e6d7921acc23e42b998b7d45b39eb6b63cd9688b2d3f5b07bb44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / BeakerShowSessions-0.1.1-py2.5.egg
| Download URL | BeakerShowSessions-0.1.1-py2.5.egg |
|---|---|
| Size | 5.8 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
db2601b9b871029f14358534c7a4d78a0f92eefee0d777406cdd5658451cd159
|
|
BLAKE2b-256 checksum How to use checksums |
2d3bcec0228b9580eb4d843b053189dee030706e233ff431a738c31548dab497
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |