{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/5"}],"enrichment":{"capability":"Provides session management middleware for Starlette and FastAPI applications, supporting multiple storage backends including cookies, in-memory storage, and Redis with configurable expiration strategies.","skillfed_tags":["session-management","asgi-middleware","starlette-fastapi"],"use_cases":["Add session support to a FastAPI REST API with cookie-based authentication and 14-day rolling expiration","Store user preferences and shopping cart data in Redis for a multi-instance web application","Implement admin-only session cookies scoped to /admin paths with automatic cleanup on browser close","Unit test session behavior using InMemoryStore without external dependencies","Migrate from stateless JWT to session-based auth with automatic session extension on user activity"],"what_it_does":"Starsessions is a session middleware library for Starlette and FastAPI that manages user session data across HTTP requests. It abstracts session storage behind a pluggable backend system, offering three built-in stores: CookieStore (client-side signed cookies), InMemoryStore (for testing), and RedisStore (for distributed deployments). The middleware handles cookie lifecycle, security defaults (HTTPS-only, browser-session lifetime by default), and optional autoloading to reduce boilerplate.\n\nThe library is designed for developers building async web applications who need flexible session handling without reinventing session management. It supports rolling sessions (where inactivity resets the timeout), path and domain binding for cookies, and explicit session loading to avoid performance overhead. Dependencies are minimal (starlette and itsdangerous), and the package supports Python 3.8 through 3.13.","worth_installing":"Yes. Starsessions is production-ready (Development Status 5), actively maintained, has zero known vulnerabilities, and solves a common problem in Starlette/FastAPI applications with minimal dependencies and flexible storage options. The permissive MIT license and broad Python version support (3.8\u20133.13) make it suitable for most projects."},"id":"starsessions","links":{"html":"https://skillfed.io/packages/starsessions","md":"https://skillfed.io/packages/starsessions.md","pypi":"https://pypi.org/project/starsessions/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2024-10-23","license_spdx":null,"license_treatment":"permissive","name":"starsessions","python_support":"supports_current","summary":"Advanced sessions for Starlette and FastAPI frameworks"},"popularity":{"monthly_downloads":449233,"position":6597,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.2.1"}
