{"id":17360611,"url":"https://github.com/ivanyu/flask-mongo-sessions","last_synced_at":"2025-04-15T00:31:29.844Z","repository":{"id":7618474,"uuid":"8977427","full_name":"ivanyu/flask-mongo-sessions","owner":"ivanyu","description":"Server-side sessions for Flask with MongoDB","archived":false,"fork":false,"pushed_at":"2020-07-20T08:30:00.000Z","size":30,"stargazers_count":8,"open_issues_count":7,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-18T19:03:30.354Z","etag":null,"topics":["flask","mongodb"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivanyu.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-23T21:35:09.000Z","updated_at":"2021-03-12T19:35:56.000Z","dependencies_parsed_at":"2022-09-05T02:40:17.682Z","dependency_job_id":null,"html_url":"https://github.com/ivanyu/flask-mongo-sessions","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanyu%2Fflask-mongo-sessions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanyu%2Fflask-mongo-sessions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanyu%2Fflask-mongo-sessions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanyu%2Fflask-mongo-sessions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivanyu","download_url":"https://codeload.github.com/ivanyu/flask-mongo-sessions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248984273,"owners_count":21193717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","mongodb"],"created_at":"2024-10-15T19:26:43.043Z","updated_at":"2025-04-15T00:31:29.583Z","avatar_url":"https://github.com/ivanyu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"flask-mongo-sessions\n====================\n\n.. module:: flask-mongo-sessions\n\nflask-mongo-sessions helps you to add server-side sessions to `Flask`_ with\n`MongoDB`_ storage.\n\n⚠️ This project is not being actively developed by the original author any more. PRs are welcome, though.\n\n⚠️ Please note that Python 3 is not supported now (`issue \u003chttps://github.com/ivanyu/flask-mongo-sessions/issues/12\u003e`_).\n\nRequirements\n------------\n\nThe extensions requires Flask\u003e=0.8 and also `PyMongo`_ (`Flask-PyMongo`_)\nor `MongoEngine`_ (`Flask-MongoEngine`_)\n\nTested with Python 2.5, 2.6 and 2.7.\n\nInstallation\n------------\n\nInstallation of the extension is easy::\n\n    $ pip install flask-mongo-sessions\n\nor::\n\n    $ easy_install install flask-mongo-sessions\n\nor::\n\n    $ python setup.py install\n\n\nUsage\n-----\n\nTo work, the extension needs PyMongo's *Database* object and sessions\ncollection name. The object can be taken from PyMongo:\n\n.. code-block:: python\n\n    from flask import Flask\n    from flask.ext.pymongo import PyMongo\n    from flask.ext.mongo_sessions import MongoDBSessionInterface\n\n    app = Flask(__name__)\n    app.config['MONGO_DBNAME'] = 'database-name'\n    mongo = PyMongo(app)\n    with app.app_context():\n        app.session_interface = MongoDBSessionInterface(app, mongo.db, 'sessions')\n\nor from MongoEngine:\n\n.. code-block:: python\n\n    from flask import Flask\n    from flask.ext.mongoengine import MongoEngine\n    from flask.ext.mongo_sessions import MongoDBSessionInterface\n\n    app = Flask(__name__)\n    app.config['MONGODB_DB'] = 'database-name'\n    db = mongo.connection[app.config['MONGODB_DB']]\n    app.session_interface = MongoDBSessionInterface(app, db, 'sessions')\n\nAll connection parameters (address, port, etc.) must be set for the respective\nextension.\n\nUsers sessions will be stored in the specified MongoDB database in\nthe collection with specified name.\n\nAuthors and contributors\n------------------------\nOriginally developed by Ivan Yurchenko.\n\nLicense\n-------\nMIT license (see *LICENSE* file)\n\n\nAlso\n----\n\nPlease, send me a feedback about the app (bugs, examples of usage etc.)\n\n\n.. _Flask: http://flask.pocoo.org/\n.. _MongoDB: http://www.mongodb.org/\n.. _PyMongo: https://github.com/mongodb/mongo-python-driver\n.. _Flask-PyMongo: https://github.com/dcrosta/flask-pymongo/\n.. _MongoEngine: http://mongoengine.org/\n.. _Flask-MongoEngine: https://github.com/MongoEngine/flask-mongoengine\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanyu%2Fflask-mongo-sessions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivanyu%2Fflask-mongo-sessions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanyu%2Fflask-mongo-sessions/lists"}