Server-side session support for Flask
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file flask_session-0.8.0.tar.gz
.
File metadata
- Download URL: flask_session-0.8.0.tar.gz
- Upload date:
- Size: 940.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20e045eb01103694e70be4a49f3a80dbb1b57296a22dc6f44bbf3f83ef0742ff |
|
MD5 | 88b4e9839faf8a8111f08c5b90ae44da |
|
BLAKE2b-256 | 86d70ba4180513abe28eadc208123c76f9f09e290d5939fb2eb68323b9733354 |
File details
Details for the file flask_session-0.8.0-py3-none-any.whl
.
File metadata
- Download URL: flask_session-0.8.0-py3-none-any.whl
- Upload date:
- Size: 24.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dae6e9ddab334f8dc4dea4305af37851f4e7dc0f484caf3351184001195e3b7 |
|
MD5 | 8dd4168434905828552425b544881630 |
|
BLAKE2b-256 | 671bf085ceebb825d1cfaf078852b67cd248a33af2905f40ba9860cc006d966b |