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 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.

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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: flask_session-0.7.0rc2.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

Hashes for flask_session-0.7.0rc2.tar.gz
Algorithm Hash digest
SHA256 8d3756ef0707621a2f2064affaab68135b1b041f1b791576a60a217f3ab71a7e
MD5 20b64ebd9ac8ca65fd175ade1177b853
BLAKE2b-256 9afc9b32917428a26a30c5c73d75defc0ecfe41d5edb5f88db84e28feb4f67e5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for flask_session-0.7.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 c91ee25552b7d68ad93fee884400342cdee617d0b2d99219a5882e3895d332a7
MD5 39a0bcbbfb3387c2bca2b0a8db898f01
BLAKE2b-256 f66c5ae8b8d5df1c97c4e0eba3b3c6496e9e1e7f6abf540ae1067f1e16efa828

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