Skip to main content

An asynchronous session backend with mongodb for tornado

Project description

Info:

Torsession is an asynchronous session backend with mongodb for tornado.

Author:

Lime YH.Shi

https://travis-ci.org/shiyanhui/monguo.png https://pypip.in/v/monguo/badge.png https://pypip.in/d/monguo/badge.png

Installation

$ pip install git+https://github.com/mongodb/motor.git
$ pip install torsession

Dependencies

  • tornado 3+

  • motor 0.1+

Example

  1. Generate session after login:

    yield session.generate_session()
  2. Clear session when logout:

    yield session.delete_session()
  3. Get a value:

    yield session.get(key)
  4. Set a value:

    yield session.set(key, value)
  5. Delete a value:

    yield session.delete(key)
  6. Refresh session id:

    yield session.refresh_session()
  7. Get session id:

    session.session_id
  8. Set session id:

    session.session_id = new_session_id

Project details


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)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page