Server-side session support for Flask
Project Links
Meta
Author: Shipeng Feng
Maintainer: Pallets Community Ecosystem
Requires Python: >=3.8
Classifiers
Development Status
- 4 - Beta
Environment
- Web Environment
Framework
- Flask
Intended Audience
- Developers
License
- OSI Approved :: BSD License
Operating System
- OS Independent
Programming Language
- Python
Topic
- Internet :: WWW/HTTP :: Session
- Internet :: WWW/HTTP :: WSGI
- Internet :: WWW/HTTP :: WSGI :: Application
- Software Development :: Libraries :: Application Frameworks
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
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.
0.8.0
Mar 26, 2024
0.7.0
Mar 18, 2024
0.7.0rc2
Mar 08, 2024
0.7.0rc1
Mar 03, 2024
0.6.0
Jan 19, 2024
0.6.0rc1
Jan 19, 2024
0.5.0
May 11, 2023
0.4.1
Apr 30, 2023
0.4.0
Jun 24, 2021
0.3.2
May 14, 2020
0.3.1
Feb 09, 2017
0.3.0
Jul 21, 2016
0.2.3
Dec 09, 2015
0.2.2
Sep 17, 2015
0.2.1
Aug 20, 2015
0.2
Jun 01, 2015
0.1.1
Apr 30, 2014
0.1
Apr 29, 2014