An asynchronous session backend with mongodb for tornado
Project description
- Info:
Torsession is an asynchronous session backend with mongodb for tornado.
Installation
$ pip install git+https://github.com/mongodb/motor.git
$ pip install torsession
Dependencies
tornado 3+
motor 0.1+
Example
Generate session after login:
yield session.generate_session()
Clear session when logout:
yield session.delete_session()
Get a value:
yield session.get(key)
Set a value:
yield session.set(key, value)
Delete a value:
yield session.delete(key)
Refresh session id:
yield session.refresh_session()
Get session id:
session.session_id
Set session id:
session.session_id = new_session_id
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
torsession-0.1.1.tar.gz
(2.8 kB
view hashes)