---
title: "Flask-Session | pypx"
description: "Server-side session support for Flask"
canonical_url: "https://pypx.app/packages/flask-session"
meta:
  "og:description": "Server-side session support for Flask"
  "og:image": "https://pypx.app/_og/d/h_630%2Cc_PackageCard%2Cname_Flask-Session%2Cversion_0.8.0%2Csummary_Server-side%2Bsession%2Bsupport%2Bfor%2BFlask%2Clicense_BSD%2BLicense%2Cp_Ii9wYWNrYWdlcy9mbGFzay1zZXNzaW9uIg%2Cs_fk9LE2QcLOu5L27P.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "Flask-Session 0.8.0"
  "twitter:image": "https://pypx.app/_og/d/h_630%2Cc_PackageCard%2Cname_Flask-Session%2Cversion_0.8.0%2Csummary_Server-side%2Bsession%2Bsupport%2Bfor%2BFlask%2Clicense_BSD%2BLicense%2Cp_Ii9wYWNrYWdlcy9mbGFzay1zZXNzaW9uIg%2Cs_fk9LE2QcLOu5L27P.png"
---

> Index of every page on this site: [llms.txt](https://pypx.app/llms.txt)

# **Flask-Session**

v0.8.0

Server-side session support for Flask

24 KB Python 3.8+ py3-none-anyBSD License3 deps Possibly Unmaintained

[** Diff **](https://pypx.app/packages/Flask-Session/diff)

`$ uv add Flask-Session`

![Flask-Session](https://raw.githubusercontent.com/pallets-eco/flask-session/main/docs/_static/icon/favicon-192x192.png)

==============

# Flask-Session

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

![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/pallets-eco/flask-session/test.yaml?logo=github) ![Documentation status](https://img.shields.io/readthedocs/flask-session?logo=readthedocs) ![BSD-3 Clause License](https://img.shields.io/github/license/pallets-eco/flask-session?logo=bsd) ![Common Changelog](https://common-changelog.org/badge.svg) ![Code style: ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json&label=style) ![PyPI - Latest Version](https://img.shields.io/pypi/v/flask-session.svg?logo=pypi) ![PyPI - Python Version](https://img.shields.io/badge/dynamic/json?query=info.requires_python&label=python&logo=python&url=https%3A%2F%2Fpypi.org%2Fpypi%2Fflask-session%2Fjson) ![Discord](https://img.shields.io/discord/531221516914917387?logo=discord) ![PyPI - Downloads](https://img.shields.io/pypi/dm/flask-session?logo=pypi)

## Installing

Install and update using pip:

```bash
$ pip install flask-session
```

## A Simple Example

```python
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](https://flask-session.readthedocs.io/en/latest/).

## Maintainers

- [Lxstr](https://github.com/Lxstr)
- Pallets Team

## Contribute

Thanks to all those who have contributed to Flask-Session. A full list can be found at [CONTRIBUTORS.md](https://github.com/pallets-eco/flask-session/blob/development/CONTRIBUTORS.md).

If you want to contribute, please check the [CONTRIBUTING.rst](https://github.com/pallets-eco/flask-session/blob/development/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.

## **Details **

<dl>

<dt>Version</dt>
<dd>0.8.0</dd>

<dt>License</dt>
<dd>BSD License</dd>

<dt>Python</dt>
<dd>&gt;=3.8</dd>

<dt>Maintainer</dt>
<dd>Shipeng Feng &lt;fsp261@gmail.com&gt;</dd></dl>

## **Links**

- [Changes](https://flask-session.readthedocs.io/changes.html)
- [Chat](https://discord.gg/pallets)
- [Documentation](https://flask-session.readthedocs.io)
- [Issue Tracker](https://github.com/pallets-eco/flask-session/issues/)
- [Source Code](https://github.com/pallets-eco/flask-session/)
- [View on PyPI](https://pypi.org/project/Flask-Session/)

## **Maintainers **

- Shipeng Feng · [fsp261@gmail.com](mailto:fsp261@gmail.com)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://pypx.app/#website","@type":"WebSite","description":"The Python Package Index, reimagined. Fast search, dependency insights, download trends, and changelogs — all in one place.","name":"pypx","url":"https://pypx.app/"},{"@id":"https://pypx.app/packages/flask-session#webpage","@type":"WebPage","description":"Server-side session support for Flask","name":"Flask-Session","url":"https://pypx.app/packages/flask-session","isPartOf":{"@id":"https://pypx.app/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://pypx.app/packages/flask-session"]}]},{"@id":"https://pypx.app/packages/flask-session#/schema/software-application/1","@type":"SoftwareApplication","applicationCategory":"DeveloperApplication","description":"Server-side session support for Flask","license":"BSD License","name":"Flask-Session","softwareVersion":"0.8.0"}]}
```

## Sitemap

See the full [sitemap](https://pypx.app/sitemap.md) for all pages.
