Skip to main content

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

Project description

FastAPI-Sessions


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

Source Code: https://github.com/jordanisaacs/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 the routes you want
  • Timestamp signed session IDs with itsdangerous
  • Compabitibility with OpenAPI docs using APIKeyCookie
  • Pydantic models for verifying session data
  • Abstract session backend so you can build one that fits your needs
  • Currently included backends
    • In memory

Notes:

  • Currently working on CSRF tokens
  • Plan is to implement more backends

Installation

pip install fastapi-sessions

Guide

Check out the guide to building and using session based authentication with fastapi-sessions: https://jordanisaacs.github.io/fastapi-sessions/guide/getting_started/

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

fastapi-sessions-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

fastapi_sessions-0.1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file fastapi-sessions-0.1.0.tar.gz.

File metadata

  • Download URL: fastapi-sessions-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.1 Windows/10

File hashes

Hashes for fastapi-sessions-0.1.0.tar.gz
Algorithm Hash digest
SHA256 820eaafd07b7bb2323d6049dbcdbd643f6862961dbbab00a00bedcfdae204522
MD5 97efbc5ef51952eb0f407c2490951e1b
BLAKE2b-256 5f842cdb82b85b026069b96e89216feb0a7a5339e4ebe7d50e2570d18e97d60b

See more details on using hashes here.

File details

Details for the file fastapi_sessions-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_sessions-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f3d3f5cd629c2ff7b80bd58021ae621f8db421e7bd6a17217e4e57c30989f224
MD5 d196180f072fd76ccded873b7687960b
BLAKE2b-256 7f8a21f88040df00c85c034ca0be069cc0441f1d2435520b19e0fc98a7d6c224

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