fastapi-users-db-sqlalchemy
FastAPI Users database adapter for SQLAlchemy
What it is and what it does
This package is a database adapter that bridges FastAPI Users (a user management library) with SQLAlchemy ORM, allowing you to persist user data in a relational database. It handles the integration between FastAPI Users' authentication logic and your SQLAlchemy models, so you don't have to write the adapter yourself.
You use it by installing it alongside fastapi-users and sqlalchemy, then instantiating its database class with your SQLAlchemy session and user model. It's designed to work with FastAPI's async patterns and supports modern Python versions (3.9–3.13). The package is marked Production/Stable but has not been released in over a year, so while it appears complete for its scope, you should verify it still works with your target versions of its dependencies.
Use it for:
- Add a complete user registration and login system to a FastAPI app backed by a SQL database without writing authentication code from scratch.
- Integrate FastAPI Users with an existing SQLAlchemy schema to add user management to a legacy or new async FastAPI project.
- Build a multi-tenant or role-based access control system by extending FastAPI Users' user model through SQLAlchemy ORM.
- Quickly prototype a FastAPI service with built-in user authentication and session management using SQLAlchemy as the persistence layer.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a SQLAlchemy ORM adapter for FastAPI Users, enabling user registration and authentication in FastAPI applications with database persistence via SQLAlchemy.
Yes, if you are building a FastAPI application and need user authentication with SQLAlchemy. The package has low install friction, no known vulnerabilities, and a permissive license. However, the 587-day release gap and dormant maintenance status mean you should verify compatibility with your specific versions of fastapi-users and sqlalchemy before committing to production use.
Install
fastapi-users-db-sqlalchemy on PyPI
pip
pip install fastapi-users-db-sqlalchemyuv
uv add fastapi-users-db-sqlalchemypoetry
poetry add fastapi-users-db-sqlalchemyInstalling fastapi-users-db-sqlalchemy
Before you install
Low friction installation with only two runtime dependencies (fastapi-users and sqlalchemy). Maintenance is dormant—no releases in 587 days—but the package is marked Production/Stable and the repository remains active with a recent commit on 2025-01-04.
License in practice
Licensed under MIT (permissive), allowing free use, modification, and distribution with minimal restrictions.
Quickstart
pip install fastapi-users-db-sqlalchemy
from fastapi_users_db_sqlalchemy import SQLAlchemyUserDatabase
from sqlalchemy.ext.asyncio import AsyncSession
# Integrate with fastapi-users and your SQLAlchemy models
user_db = SQLAlchemyUserDatabase(session, User)
Requires Python 3.9 or later; assumes an existing FastAPI application and SQLAlchemy async session setup.
Verify before relying
- Whether the 587-day release gap indicates the package is stable or at risk of becoming unmaintained.
- Compatibility guarantees with recent versions of fastapi-users and sqlalchemy beyond what classifiers declare.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — fastapi-users, sqlalchemy |
| Maintenance | dormant — 587 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,349,377/month — #4,018 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fastapi_users_db_sqlalchemy-7.0.0-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-usersProvides ready-to-use user registration, login,…
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-SQLAlchemyProvides middleware and helpers to integrate…
permissive · top 15,000 on PyPI
ormarAn async ORM for Python that unifies database…
permissive · top 15,000 on PyPI
fastapi-filterAdds declarative filtering, sorting, and…
permissive · top 15,000 on PyPI
cerbos-sqlalchemyConverts Cerbos authorization query plans into…
permissive · top 15,000 on PyPI
fastcrudFastCRUD provides async CRUD operations and…
permissive · top 15,000 on PyPI
sqlalchemy-verticaProvides a SQLAlchemy dialect for Vertica,…
permissive · top 15,000 on PyPI
sqlalchemy-adapterBridges PyCasbin access-control policies with…
permissive · top 5,000 on PyPI
SQLAlchemySQLAlchemy is a Python SQL toolkit and Object…
permissive · top 100 on PyPI
sqlmodelSQLModel combines SQLAlchemy and Pydantic to…
permissive · top 5,000 on PyPI