This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Environment

python version: >= 3.4

backend: redis,memcache,disk

required: tornadis, tornado, asyncmc

Installation

$ python3.x setup.py install

or

$ pip3.x install tornasess

Quickstarted

create session instance

from tornado import ioloop,gen
from tornasess  import SessionCacheFactory

config = {
   "host":"localhost",
   "port":6379,
}
sess_fac = SessionCacheFactory("redis", config)

# or
# config = {
#      "host":["192.168.0.1","192.168.0.2"],
#      "port":[4000,5000]
# }
# sess_fac = SessionCacheFactory("memcache", config)
#
#
# or
# config = {"root":"/tmp"}
# sess_fac = SessionCacheFactory("disk", config)
#

session = sess_fac.get_session()

set session data

yield session.start()
session['name'] = 'xxxxx'
session.set("age",100)
session.multi_set({"address":"xxxx","sex":"xxx"})
yield session.end(expires=3600)

get session data

session_id = "GU3ZTM2YTA5ZWViNDE4MTgzM2Q3MzhhMjdjY2IyOWU="
yield session.start(session_id)
session['name']
session.get('name')
session.multi_get(['address','age','name'])
session.all()
#check session field existence
print('name' in session)
#get session id
session.session_id

#Note here!!
#   if you don't make change to session data,
#   it's not necessary to call 'session.end()'

delete session data

session_id = "GU3ZTM2YTA5ZWViNDE4MTgzM2Q3MzhhMjdjY2IyOWU="
yield session.start(session_id)
session.delete("name")
del session['age']
yield session.end()

destroy session

session_id = "GU3ZTM2YTA5ZWViNDE4MTgzM2Q3MzhhMjdjY2IyOWU="
yield session.start(session_id)
session.destroy()
yield session.end()

cache session instance

# after you used session ,you can cache it to cache factory
sess_fac.cache(session)

Version

0.1

LICENSE

MIT LICENSE

Release History

Release History

0.6

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
tornasess-0.6.tar.gz (5.3 kB) Copy SHA256 Checksum SHA256 Source Aug 21, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting