{ "info": { "author": "MitchellChu", "author_email": "zxdjsj@126.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP :: Session" ], "description": "Torndsession Session\n====================\n\n\n`Torndsession `_ is a session extension for `Tornado `__ web framework.\nTorndsession support application memory, file, redis or memcached to save session data for request, and it's easy to extend for developer.\n\nQuick links\n===========\n \n* `Documentation `_\n \n* `Source (github) `_\n \n* `Torndsession License `_\n \n* `Examples `_\n\n\nHello, Session\n==============\n\nHere is a simple \"Hello, Session\" example web app for Tornado with Torndsession.::\n\n\n import tornado.web\n import tornado.httpserver\n import tornado.ioloop\n import torndsession\n\n\n class Application(tornado.web.Application):\n def __init__(self):\n handlers = [\n (r\"/\", MainHandler),\n ]\n settings = dict(\n debug=True,\n )\n # sid_name, lifetime added in 1.1.5.0\n # sid_name: the name of session id in cookies.\n # lifetime: session default expires seconds.\n session_settings = dict(\n driver='memory',\n driver_settings={'host': self},\n force_persistence=True,\n sid_name='torndsessionID',\n session_lifetime=1800\n ),\n settings.update(session=session_settings)\n tornado.web.Application.__init__(self, handlers, **settings)\n\n\n class MainHandler(torndsession.sessionhandler.SessionBaseHandler):\n def get(self):\n self.write(\"Hello, Session.
\")\n if 'data' in self.session:\n data = self.session['data']\n else:\n data = 0\n self.write('data=%s' % data)\n self.session[\"data\"] = data + 1\n\n\n def main():\n http_server = tornado.httpserver.HTTPServer(Application())\n http_server.listen(8000)\n tornado.ioloop.IOLoop.instance().start()\n\n\n if __name__ == \"__main__\":\n main()\n\n\nIn this example, Request handler obtain memory session feature, it just inherit from SessionBaseHandler. more session example see `torndsession demos `_.\n\n\nInstallation\n============\n\n**Automatic installation**:\n\n::\n\n pip install torndsession\n\nTorndsession is listed in `PyPI `__ and can be installed with `pip` or `easy_install`. Note that this installation can not install demos applicatinos which be included in source code.\n\nThe another way is use `git+` install torndsession from github.\n\n::\n\n pip install git+https://github.com/mitchellchu/torndsession\n\n\n\n**Manual installation**:\n\nIn this way, you need download the source from `PyPI `__.::\n\n tar xvzf torndsession.tar.gz\n cd torndsession\n python setup.py build\n sudo python setup.py install\n\n\nThe Torndsession source code is hosted on `GitHub `_.\n\n\nUpdated\n=======\n\nTorndsession 1.1.5:\n\n- fixed bug in 1.1.4\n- default session id value generator changed. see `#ISSUE 12# `_.\n- added two custom key in settings.\n\n - sid_name: session's cookie name.\n - session_lifetime: default expired seconds for session.\n\nTorndsession 1.1.4:\n\n- fixed bug\n\nTorndsession 1.1.3 fixed some bug and supported python 3.x.\n\n\nRequires\n========\n\n\n+ `Tornado `__\n+ `Redis (Optional) `_\n+ `Memcached (Optional) `_\n\n\n\nLICENSE\n=======\nTorndsession is licensed under MIT.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/mitchellchu/torndsession", "keywords": "torndsession tornado session redis memcached memory file python", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "torndsession", "package_url": "https://pypi.org/project/torndsession/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/torndsession/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/mitchellchu/torndsession" }, "release_url": "https://pypi.org/project/torndsession/1.1.5.1/", "requires_dist": null, "requires_python": null, "summary": "Session extensions for Tornado,Support memory, file, redis or memcached to save session data.", "version": "1.1.5.1" }, "last_serial": 2613893, "releases": { "1.1.1": [ { "comment_text": "", "digests": { "md5": "b777c9d98ae282465ffebf41d8884c8d", "sha256": "23cef65ddafcf9ef34bbb08d565a2bfe408261ea532abb8682ed80870cdc4e53" }, "downloads": -1, "filename": "torndsession-1.1.1.tar.gz", "has_sig": false, "md5_digest": "b777c9d98ae282465ffebf41d8884c8d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7581, "upload_time": "2014-09-04T13:35:37", "url": "https://files.pythonhosted.org/packages/26/aa/5d86efc275583ca6c8d68f441ad608416b7e4089ec9ae6854a4c1ef451cd/torndsession-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "2317c9eb00410d812af5463007ebd93f", "sha256": "ec5ec23854c5f440fe3c863a41a8a1213cca7226ee711b3065e094e0d00ec365" }, "downloads": -1, "filename": "torndsession-1.1.2.tar.gz", "has_sig": false, "md5_digest": "2317c9eb00410d812af5463007ebd93f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7590, "upload_time": "2014-09-19T09:31:30", "url": "https://files.pythonhosted.org/packages/88/9b/c3c94cec626643a338b8be5877e394b03082220771e4ca47d29cac8a4507/torndsession-1.1.2.tar.gz" } ], "1.1.3": [ { "comment_text": "", "digests": { "md5": "658a9b6d7656d384948c9f068098f0cd", "sha256": "53b3002d68164f382685268f0237de2aba8addf3da9924827813a9e2420fd1e3" }, "downloads": -1, "filename": "torndsession-1.1.3.tar.gz", "has_sig": false, "md5_digest": "658a9b6d7656d384948c9f068098f0cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7644, "upload_time": "2015-03-16T15:56:36", "url": "https://files.pythonhosted.org/packages/3c/3f/684b5683801c49db2a024d04d9113649596940093b7d535d5f94698f66eb/torndsession-1.1.3.tar.gz" } ], "1.1.4": [ { "comment_text": "", "digests": { "md5": "c4e0f67ab3dc6082dcd64e29c7630985", "sha256": "e67eafa905a301dc6e52f7adcd04ebc29404e72e1539d53fe7f61de054dbe2ae" }, "downloads": -1, "filename": "torndsession-1.1.4.tar.gz", "has_sig": false, "md5_digest": "c4e0f67ab3dc6082dcd64e29c7630985", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7628, "upload_time": "2015-06-30T12:22:44", "url": "https://files.pythonhosted.org/packages/09/fd/61e6e13c56107943210f5baf8a29bf880fe96fc31b0021fa52f6a7f25b70/torndsession-1.1.4.tar.gz" } ], "1.1.5.1": [ { "comment_text": "", "digests": { "md5": "b74d6b2d6fde862fc24e0384fc4219f6", "sha256": "8479e4e06805f4b96585e784c9d93bb6be18a4c1df3a3f878af0252cd5856a8e" }, "downloads": -1, "filename": "torndsession-1.1.5.1.zip", "has_sig": false, "md5_digest": "b74d6b2d6fde862fc24e0384fc4219f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16903, "upload_time": "2017-01-20T04:46:03", "url": "https://files.pythonhosted.org/packages/fc/f0/95a55a4480224eb3cc4e6b8ef71fb8c6d0783b696ea98533e9fee30af39d/torndsession-1.1.5.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b74d6b2d6fde862fc24e0384fc4219f6", "sha256": "8479e4e06805f4b96585e784c9d93bb6be18a4c1df3a3f878af0252cd5856a8e" }, "downloads": -1, "filename": "torndsession-1.1.5.1.zip", "has_sig": false, "md5_digest": "b74d6b2d6fde862fc24e0384fc4219f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16903, "upload_time": "2017-01-20T04:46:03", "url": "https://files.pythonhosted.org/packages/fc/f0/95a55a4480224eb3cc4e6b8ef71fb8c6d0783b696ea98533e9fee30af39d/torndsession-1.1.5.1.zip" } ] }