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
Built Distributions
File details
Details for the file BeakerShowSessions-0.1.1.zip
.
File metadata
- Download URL: BeakerShowSessions-0.1.1.zip
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d678affc866e5eee429d901cc2e2f954c90cf776fb348bd556ff811916d71620 |
|
MD5 | 3deb4f330f72924da340a864493141f3 |
|
BLAKE2b-256 | 143663c9dd0280cf353ab3a569293b79da250cfa4cce8caa8c55f5cd9ca47d75 |
File details
Details for the file BeakerShowSessions-0.1.1.tar.gz
.
File metadata
- Download URL: BeakerShowSessions-0.1.1.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 492c6945f35e15ea47c9adff12762d2d42c2db49e05ae695d73eef78cf369077 |
|
MD5 | afc2c5d7e53322ee886696fdca8aa9bc |
|
BLAKE2b-256 | 4f16d70eccddfe7ea0ab53a19d7f272ba2b25a29d01aa9d1c599d1cdb96af0fd |
File details
Details for the file BeakerShowSessions-0.1.1-py2.6.egg
.
File metadata
- Download URL: BeakerShowSessions-0.1.1-py2.6.egg
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c34827cfef952c16d7e75325d3b0e0b014700d247c2ae73c7b67f392b772684 |
|
MD5 | 582d581b0121c462bdf1033a8ea335c1 |
|
BLAKE2b-256 | 3005508d4fe7e6d7921acc23e42b998b7d45b39eb6b63cd9688b2d3f5b07bb44 |
File details
Details for the file BeakerShowSessions-0.1.1-py2.5.egg
.
File metadata
- Download URL: BeakerShowSessions-0.1.1-py2.5.egg
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db2601b9b871029f14358534c7a4d78a0f92eefee0d777406cdd5658451cd159 |
|
MD5 | c15d81a9e823a42b273da50818828b22 |
|
BLAKE2b-256 | 2d3bcec0228b9580eb4d843b053189dee030706e233ff431a738c31548dab497 |