Skip to main content

Server-side session support for Flask

Project description

Flask-Session

Flask-Session

Flask-Session is an extension for Flask that adds support for server-side sessions to your application.

GitHub Actions Workflow Status Documentation status BSD-3 Clause License Common Changelog Code style: ruff PyPI - Latest Version PyPI - Python Version Discord PyPI - Downloads

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

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.

Project details


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.0.tar.gz (938.5 kB view details)

Uploaded Source

Built Distribution

flask_session-0.7.0-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file flask_session-0.7.0.tar.gz.

File metadata

  • Download URL: flask_session-0.7.0.tar.gz
  • Upload date:
  • Size: 938.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.8

File hashes

Hashes for flask_session-0.7.0.tar.gz
Algorithm Hash digest
SHA256 88e63df090e548373ff0f5e7e1a8333b5e8a5ceaebb2506571138c58351b6886
MD5 e5cd2f02e50d5bed50e7165a0365cf48
BLAKE2b-256 bc6023f2a4d50ef625e783130757690ccd28fbd47c9b04fe41583b800f0c5904

See more details on using hashes here.

File details

Details for the file flask_session-0.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flask_session-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b1d4a1ce560aa82c06f25b46a105a13e9cd43776987d6ae7d9fea2cbfc7b4bc4
MD5 edf98cd69aa9e61b2b2b897ccb46543a
BLAKE2b-256 f5f0fec9b98f9222ab1000be1ad8062d756c4fe11a2a69d5599fbe71fd9943f1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page