fastapi-users
Ready-to-use and customizable users management for FastAPI
What it is and what it does
FastAPI Users is a user management library that integrates authentication and user lifecycle operations directly into FastAPI applications. It provides pre-built routes for registration, login, password reset, and email verification, along with dependency injection helpers to retrieve the current user in route handlers. The library supports multiple authentication strategies (JWT, database-backed, Redis) and transports (Authorization header, cookies), and includes pluggable password validation and customizable user models.
The package is designed for rapid deployment of auth systems without reimplementing common patterns. It includes built-in support for SQLAlchemy async ORM and MongoDB via Beanie ODM, with full OpenAPI schema integration. The project is currently in maintenance mode, meaning it remains stable and receives security updates but will not gain new features.
Use it for:
- Quickly add user registration and login flows to a new FastAPI REST API without building auth from scratch.
- Implement OAuth2 social login alongside traditional email and password authentication.
- Set up email verification and password reset workflows with minimal custom code.
- Manage user sessions using JWT tokens or database-backed strategies with cookie or header transport.
- Inject the current authenticated user into route handlers via FastAPI dependency injection.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides ready-to-use user registration, login, password reset, and email verification routes for FastAPI applications, with pluggable authentication backends and customizable database support.
Yes, for new FastAPI projects needing standard user management. The library is stable, well-maintained for security, and has no known vulnerabilities. Maintenance mode means no new features, but existing functionality is solid and widely used. Choose it if you need a conventional auth system; avoid it only if you require cutting-edge auth features or plan to migrate to a successor toolkit when released.
Install
fastapi-users on PyPI
pip
pip install fastapi-usersuv
uv add fastapi-userspoetry
poetry add fastapi-usersInstalling fastapi-users
Before you install
Low install friction with six runtime dependencies. Project is in maintenance mode—security updates and dependency maintenance continue, but no new features are planned. Last commit 2026-07-20 with active repository status.
License in practice
MIT license (permissive) allows commercial and private use with minimal restrictions.
Quickstart
pip install fastapi-users
from fastapi_users import FastAPIUsers
from fastapi import FastAPI
app = FastAPI()
fastapi_users = FastAPIUsers(...)
app.include_router(fastapi_users.get_register_router())
Requires Python 3.10 or later; database backend (SQLAlchemy or MongoDB with Beanie) must be configured separately.
Verify before relying
- Whether maintenance mode affects long-term viability for new projects or only impacts feature development.
- Performance characteristics under high concurrent user load.
- Compatibility details with the successor authentication toolkit mentioned in the project description.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — email-validator, fastapi, makefun, pwdlib, pyjwt, python-multipart |
| Maintenance | actively maintained — 140 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,577,536/month — #3,744 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fastapi_users-15.0.5-py3-none-any.whl
Tags
More Session packages
Flask-Session adds server-side session storage…
permissive · top 5,000 on PyPI
httpx-wsAdds WebSocket support to HTTPX, enabling sync…
permissive · top 5,000 on PyPI
fastapi-users-db-sqlalchemyProvides a SQLAlchemy ORM adapter for FastAPI…
permissive · top 5,000 on PyPI
django-rest-knoxProvides token-based authentication for Django…
permissive · top 5,000 on PyPI
supertokens-pythonInterfaces a Python API with the SuperTokens…
permissive · top 15,000 on PyPI
starlette-csrfStarlette middleware that protects web…
permissive · top 15,000 on PyPI
fastapi-sessionsAdds session authentication to FastAPI…
permissive · top 15,000 on PyPI
streamlit-authenticatorAdds user authentication and access control to…
permissive · top 15,000 on PyPI
fastapi-loginAdds session and token-based user…
permissive · top 15,000 on PyPI
fastapi-auth0Integrates Auth0 authentication into FastAPI…
permissive · top 15,000 on PyPI
fastapi-ssoFastAPI plugin that adds single sign-on (SSO)…
permissive · top 5,000 on PyPI
dj-rest-authProvides drop-in REST API endpoints for user…
permissive · top 5,000 on PyPI
djoserProvides Django REST Framework views for user…
permissive · top 15,000 on PyPI
fastapi-healthAdds a health check endpoint to FastAPI…
permissive · top 15,000 on PyPI
axioms-fastapiAdds OAuth2/OIDC JWT token validation and…
permissive · top 15,000 on PyPI