Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Ready-to-use session cookies with custom backends for FastAPI

License

Notifications You must be signed in to change notification settings

jordanisaacs/fastapi-sessions

Repository files navigation

FastAPI-Sessions

Note: Currently not maintained, feel free to fork and modify to your needs


Documentation: https://jordanisaacs.github.io/fastapi-sessions/

Source Code: https://github.com/jordanisaacs/fastapi-sessions/

PyPI: https://pypi.org/project/fastapi-sessions/


Quickly add session authentication to your FastAPI project. FastAPI Sessions is designed to be user friendly and customizable.

Features

  • Dependency injection to protect routes
  • Compatible with FastAPI's auto generated docs
  • Pydantic models for verifying session data
  • Abstract session backend so you can build one that fits your needs
  • Abstract frontends to choose how you extract the session ids (cookies, header, etc.)
  • Create verifiers based on the session data
  • Mix and match frontends and backends

Currently Included Backends/Frontends:

  • Backends
    • In memory dictionary
  • Frontends
    • Signed cookies

Upcoming:

  • Documentation and user guides
  • More backends and frontends

Installation

pip install fastapi-sessions

Getting Started

Check out the guide to using fastapi-sessions: https://jordanisaacs.github.io/fastapi-sessions/guide/getting_started/

About

Ready-to-use session cookies with custom backends for FastAPI

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published