Flask-Session
v0.8.0Server-side session support for Flask
24 KB Python 3.8+ py3-none-anyBSD License3 deps Possibly Unmaintained
$ uv add Flask-Session==============
Flask-Session
Flask-Session is an extension for Flask that adds support for server-side sessions to your application.
Installing
Install and update using pip:
$ pip install flask-session
A Simple Example
from flask import Flask, session
from flask_session import Session
app = Flask(__name__)
# Check Configuration section for more details
SESSION_TYPE = 'redis'
app.config.from_object(__name__)
Session(app)
@app.route('/set/')
def set():
session['key'] = 'value'
return 'ok'
@app.route('/get/')
def get():
return session.get('key', 'not set')
Supported Storage Types
- Redis
- Memcached
- FileSystem
- MongoDB
- SQLALchemy
Documentation
Learn more at the official Flask-Session Documentation.
Maintainers
- Lxstr
- Pallets Team
Contribute
Thanks to all those who have contributed to Flask-Session. A full list can be found at CONTRIBUTORS.md.
If you want to contribute, please check the CONTRIBUTING.rst.
Donate
The Pallets organization develops and supports Flask-Session and other popular packages. In order to grow the community of contributors and users, and allow the maintainers to devote more time to the projects, please donate today.
Details
- Version
- 0.8.0
- License
- BSD License
- Python
- >=3.8
- Maintainer
- Shipeng Feng <[email protected]>
Maintainers
- Shipeng Feng · [email protected]