skillfed

fastapi-users-db-sqlalchemy

FastAPI Users database adapter for SQLAlchemy

fastapi-users-db-sqlalchemy v7.0.0 1.3M downloads/30d#4,018 on PyPI40
Permissive license DORMANT released

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-sqlalchemy

uv

uv add fastapi-users-db-sqlalchemy

poetry

poetry add fastapi-users-db-sqlalchemy

Installing 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

Development Status :: 5 - Production/StableFramework :: AsyncIOFramework :: FastAPIIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTP :: Session

Tags

fastapi user authentication sqlalchemyfastapi users database adapterfastapi registration system ormsqlalchemy user management fastapifastapi users db integrationfastapi authentication with sqlalchemyfastapi user registration orm
fastapiuser-authsqlalchemy-orm

More Session packages