Torsession
Torsession is an async && sync session backend with Mongodb for Tornado.
Installation
$ pip install torsession
Example
Async example.
from torsession.async import SessionManager
# Initialize SessionManager
sm = SessionManager(motor.MotorClient())
# create a new session or load a session
session = yield sm.new_session()
session = yield sm.load_session("session id")
# set a key-value pair
yield session.set(key, val)
# get key
val = yield session.get(key)
# delete a key
yield session.delete(key)
# refresh session id
yield session.refresh_id()
# clear a session
yield session.clear()
Sync example.
from torsession.sync import SessionManager
# Initialize SessionManager
sm = SessionManager(pymongo.MotorClient())
# create a new session or load a session
session = sm.new_session()
session = sm.load_session("session id")
# set a key-value pair
session.set(key, val)
# get key
val = session.get(key)
# delete a key
session.delete(key)
# refresh session id
session.refresh_id()
# clear a session
session.clear()
LICENSE
MIT
Metadata
Release files for torsession 0.2.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| torsession-0.2.9.tar.gz | 3.1 kB | Without provenance | Details for torsession-0.2.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| torsession-0.2.9-py2.7.egg | Legacy Egg format | - | - | Details for torsession-0.2.9-py2.7.egg |
Total release size: 10.4 kB
Release files / torsession-0.2.9.tar.gz
| Download URL | torsession-0.2.9.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e53d9e747c37e4779781381ebf6133def6dcce0e924e2087772b889e7eb6764
|
|
BLAKE2b-256 checksum How to use checksums |
0cf1bdc80d1e6ac686bb617bd340e4b049dd4c0b1e85e3c4fab69412ff99b197
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / torsession-0.2.9-py2.7.egg
| Download URL | torsession-0.2.9-py2.7.egg |
|---|---|
| Size | 7.3 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
9eebcd745f3e1b4cf05fa9c222ff8d1905b0a9e096d4237b25cac0996689d571
|
|
BLAKE2b-256 checksum How to use checksums |
6aefef883b6c3c9425d36daa49a35f9b0e36c50d292df00bbbaa2aaf19350cdd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for torsession 0.2.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.