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.
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
flask_session-0.7.0rc1.tar.gz
(936.3 kB
view details)
Built Distribution
File details
Details for the file flask_session-0.7.0rc1.tar.gz
.
File metadata
- Download URL: flask_session-0.7.0rc1.tar.gz
- Upload date:
- Size: 936.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00a609d0c4305ce9b86f92fe5ac6f01a235bd0bc4f00383559ad064ef653b50e |
|
MD5 | 49d9d7b1200ab948074c99790fe4e6c0 |
|
BLAKE2b-256 | 8a0cb6cd64419134fb160d6e63cc16536132695004aa9257b6136a4335d92a0b |
File details
Details for the file flask_session-0.7.0rc1-py3-none-any.whl
.
File metadata
- Download URL: flask_session-0.7.0rc1-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.1 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c98863711250ea4544eb77d1e6951bceb236c52f4b2743e5aa2200fe652d578 |
|
MD5 | fd691df459576717c90bb8d76eb5d64f |
|
BLAKE2b-256 | 853f697f262e65f5e1385d9b00fb1152c0c673f1d8a2f80cb4eec276d5792091 |