{ "info": { "author": "R J Ladyman [C. Titus Brown (titus@caltech.edu), and Mike Orr (mso@oz.net) for session2]", "author_email": "it@file-away.co.uk", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3 :: Only", "Topic :: Internet :: WWW/HTTP :: Session" ], "description": "\n=======================================================\nSession3: Persistent Session Management for Quixote 3.0\n=======================================================\n\n:Authors: R J Ladyman, (based upon session2 by C Titus Brown and Mike Orr)\n:Email: it@file-away.co.uk\n:License: MIT (http://www.opensource.org/licenses/mit-license.php)\n:Version: 3.0.0 released 2018-12-02\n:Status: Only the file-storage mechanism (DirectorySessionStore) is working with Quixote 3.0\n\n.. contents::\n\nIntroduction\n============\n\nQuixote_ is a Python Web application framework. It comes with an\nin-memory session manager, which works but is incompatible with\nmulti-process servers (SCGI, CGI, etc). It also forgets the sessions\nwhen the Publisher quits. `Session3` solves these problems by\nproviding a new session manager class and a simple back-end storage\nAPI. Session3 is based upon the previous Session2_ code (for, unsurprisingly,\nQuixote 2).\n\n`Session3` version 3.0.0 provides a fully functional [#limited]_ persistent storage\n back-end for use with Quixote 3.0.0 (also see Road-map_ below, for later version notes):-\n\nDirectorySessionStore_\n Store each pickled session in a file in the designated directory. The\n filename is the session ID. Uses ``fcntl`` file locking. ::\n\n DirectorySessionStore(directory)\n\n\nThis package includes a refactored SessionManager_ that makes it easy to develop\nadditional back ends, and a simplified Session class (no ``.is_dirty`` method).\nIt supports the usual ``.user``, ``.set_user()`` and ``.has_info()``\nattributes, and you can also set your own attributes which will be saved.\n\nIt's quite likely that the session stores can be adapted for use with other\nWeb frameworks; let us know if you do this so we can link to you and / or\ninclude helpful code in the package.\n\n\nChanges from Session2\n---------------------\nSince Session2_ was released a number of packages that were referred to in the documentation (and the source)\nhave either ceased to exist or moved into maintenance mode and Session3 itself is solely for Python 3.\n\n * Nose_ is in maintenance mode\n * The web-site for Twill_ has disappeared. Existing Twill code appears to be Python 2 only\n\nRoad-map\n--------\nQuixote (at time of writing - January 2019) is at version 3.0.0 and Session3 works with that\n(stable) version.\n\nQuixote 3.1.x has added BaseSessionManager and SessionStore classes requiring Session3\nto be updated (the new\nSession3 version-number will reflect the Quixote version it works with).\n\nGetting Session3\n================\n\nDownload the latest version here:\nhttp://www.file-away.co.uk/session3/dist/session3-3.0.0.tar.gz\n\n\nInstallation\n------------\nSession3 can be installed via pip (``pip3 install session3``).\nAlternatively (or if you also want the documentation) download and unpack \nthe tar.gz file, and install the normal Python way (``python3\nsetup.py install``). Note that Session3 requires Quixote 3.0.0 --- this\nis also available in pip.\n\nDocumentation\n-------------\n`API documentation`_ is available as is `Literate Programming documentation`_ ---\nyou'll need to extract it from the tar.gz file.\n\nYou can read it on-line at:\nhttp://www.file-away.co.uk/session3/README.html\n\n\nUsing session3\n==============\n\nYou need a *store*, a *manager* and then you need to tell Quixote's \npublisher to use them both: in your `create_publisher` function, place the following code::\n\n # create the session store.\n from session3.store.DirectorySessionStore import DirectorySessionStore\n from session3.SessionManager import SessionManager \n\n # create the session manager.\n store = DirectorySessionStore(path.expanduser(some_location), create=True)\n session_manager = SessionManager(store)\n\n # create the publisher.\n from quixote.publish import Publisher\n publisher = Publisher(..., session_manager.session_manager)\n\nEach session store has different initialization requirements:[#limited]_ see\nthe `API documentation`_ or the `literate programming documentation`_ for more information. \n\n\nFeatures\n========\n\nAll session stores have the following methods, which are called by the session\nmanager:-\n\n``.load_session``, ``.save_session``, ``.delete_session``,\n``.has_session``.\n\nThey also have these convenience methods:-\n\n``.setup()``:\n\tinitializes the store. \n\n``.delete_old_sessions(minutes)``:\n\tdeletes sessions that haven't been modified for N minutes. \n\tThis is meant for your application maintenance program; e.g.,\n\ta daily cron job. \n\n``.iter_sessions()``:\n\tReturn an iterable of (id, session) for all sessions\n\tin the store. This is for admin applications that want to browse the sessions.\n\tThe DirectorySession will raise a *NotImplementedError* [#wasinsession2]_.\n\nAll stores have ``.is_multiprocess_safe`` and ``.is_thread_safe`` attributes.\nAn application can check these flags and abort if configured inappropriately.\nThe flags are defined as follows:-\n\n- DirectorySessionStore is multiprocess safe because it uses ``fcntl`` file\n locking. This limits its use to POSIX. See the fcntl caution below. It may\n be thread safe because it always locks-unlocks within the same method, but we\n don't know for sure so the attribute is false. [#limited]_\n\nInteractive Testing\n-------------------\n\nsession3 comes with an interactive web test application. To run the web demo, \ncd to the **test/** directory in the application source and run::\n\n $ test_session2.py directory\n\nPoint your web browser to http://localhost:8080/ and play around.\nYou can use ``--host=hostname`` and ``--port=N`` to bind to a different hostname\nor port.\n\nPress ctrl-C to quit the demo (or command-C on the Mac, or ctrl-Break on\nWindows).\n\n``fcntl`` Caution\n-----------------\n\nOn Mac OS X when using PTL, import ``fcntl`` *before* enabling PTL.\nOtherwise the import hook may load the deprecated FCNTL.py instead due to\nthe Mac's case-insensitive filesystem, which will cause errors down the road.\nThis was supposedly fixed in Python 2.4, which doesn't have FCNTL.py.\n\n.. _xxQuixote: http://www.mems-exchange.org/software/quixote/\n.. _Quixote: http://quixote.ca/\n.. _MySQL: http://mysql.org/\n.. _PostgreSQL: http://postgresql.org/\n.. _Paste: https://github.com/cdent/paste/\n.. _Durus: http://www.mems-exchange.org/software/durus/\n.. _twill: https://pypi.org/project/twill/\n.. _api documentation: ./docs/session3/index.html\n.. _literate programming documentation: ./docs/literate/index.html\n.. _nose: https://nose.readthedocs.io/en/latest/\n.. _session2: http://quixote.idyll.org/session2/\n\n\n.. _DirectorySessionStore: docs/session3/store/DirectorySessionStore.m.html\n.. _SessionManager: docs/session3/SessionManager.m.html\n\n.. _DurusSessionStore: epydoc-html/session2.store.DurusSessionStore.DurusSessionStore-class.html\n.. _MySQLSessionStore: epydoc-html/session2.store.MySQLSessionStore.MySQLSessionStore-class.html\n.. _PostgresSessionStore: epydoc-html/session2.store.PostgresSessionStore.PostgresSessionStore-class.html\n.. _ShelveSessionStore: epydoc-html/session2.store.ShelveSessionStore.ShelveSessionStore-class.html\n\n\n\n--------------\n\n.. [#limited] Note that only DirectorySessionStore_ is working for version 3.0 \n.. [#dict_note] DictSession is especially useful for applications that may want\n to use `Paste`_'s session middleware in the future, because it is dict-based.\n However, the migration for ``.user`` and ``.set_user()`` is not yet clear.\n.. [#wasinsession2] For the Session2 code, this *was* implemented but *only* for MySQL\n\n\n\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.file-away.co.uk/quixote/session3/", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "session3", "package_url": "https://pypi.org/project/session3/", "platform": "Most", "project_url": "https://pypi.org/project/session3/", "project_urls": { "Homepage": "http://www.file-away.co.uk/quixote/session3/" }, "release_url": "https://pypi.org/project/session3/3.0.post0/", "requires_dist": [ "Quixote (<=3.0.0,>=3.0.0)" ], "requires_python": ">=3.4", "summary": "Persistent sessions for Quixote 3.0.0", "version": "3.0.post0" }, "last_serial": 4694043, "releases": { "3.0.0": [ { "comment_text": "", "digests": { "md5": "e0185044924fe925ba44f99fbb59697e", "sha256": "759df9d1e279478e73253cbb6fab16a133ca986e47ae98e5a01dd1cd13c36051" }, "downloads": -1, "filename": "session3-3.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "e0185044924fe925ba44f99fbb59697e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 19542, "upload_time": "2019-01-14T12:50:34", "url": "https://files.pythonhosted.org/packages/5e/2a/2cfeace6c503ad4c86f173aa43e844ca1db4f8d20d199db4b0046f753d65/session3-3.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5e905c35e990fed3f8b6e863ac711f94", "sha256": "dd027e0fa8b8a160c60a22209a539c89daf625ccc53887f56cc7814dc48939de" }, "downloads": -1, "filename": "session3-3.0.0.tar.gz", "has_sig": false, "md5_digest": "5e905c35e990fed3f8b6e863ac711f94", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 116182, "upload_time": "2019-01-14T12:50:37", "url": "https://files.pythonhosted.org/packages/30/59/c4fb5f58bd8e26d083e45e1a27552579937086ff5d56f450f5727a5850a0/session3-3.0.0.tar.gz" } ], "3.0.post0": [ { "comment_text": "", "digests": { "md5": "685151ebd9b6a15c14750e0852d262ed", "sha256": "95a0590d4b6909d627e11f434bbc2093b802174a32247ea0ac2fcc8526cf3626" }, "downloads": -1, "filename": "session3-3.0.post0-py3-none-any.whl", "has_sig": false, "md5_digest": "685151ebd9b6a15c14750e0852d262ed", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 19612, "upload_time": "2019-01-14T13:02:21", "url": "https://files.pythonhosted.org/packages/10/1e/7b1bbaf94d06cc7bd01d57e3ce7077e48eeed3270f132b17f6fc98b4675a/session3-3.0.post0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3590746272cc2769c910b5bc7fc124eb", "sha256": "7c6ef201f6ddc22b3b69b8aea432d790390987cf4fc9d9c11a3cdd17ac06ea5f" }, "downloads": -1, "filename": "session3-3.0.post0.tar.gz", "has_sig": false, "md5_digest": "3590746272cc2769c910b5bc7fc124eb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 116349, "upload_time": "2019-01-14T13:02:24", "url": "https://files.pythonhosted.org/packages/b1/9e/71cc46df9d2e0ec9f1284187492642153a91271c81107d92c69dbbe7602e/session3-3.0.post0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "685151ebd9b6a15c14750e0852d262ed", "sha256": "95a0590d4b6909d627e11f434bbc2093b802174a32247ea0ac2fcc8526cf3626" }, "downloads": -1, "filename": "session3-3.0.post0-py3-none-any.whl", "has_sig": false, "md5_digest": "685151ebd9b6a15c14750e0852d262ed", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 19612, "upload_time": "2019-01-14T13:02:21", "url": "https://files.pythonhosted.org/packages/10/1e/7b1bbaf94d06cc7bd01d57e3ce7077e48eeed3270f132b17f6fc98b4675a/session3-3.0.post0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3590746272cc2769c910b5bc7fc124eb", "sha256": "7c6ef201f6ddc22b3b69b8aea432d790390987cf4fc9d9c11a3cdd17ac06ea5f" }, "downloads": -1, "filename": "session3-3.0.post0.tar.gz", "has_sig": false, "md5_digest": "3590746272cc2769c910b5bc7fc124eb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 116349, "upload_time": "2019-01-14T13:02:24", "url": "https://files.pythonhosted.org/packages/b1/9e/71cc46df9d2e0ec9f1284187492642153a91271c81107d92c69dbbe7602e/session3-3.0.post0.tar.gz" } ] }