Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

AuthLoom

AuthLoom is a Python 3.12 or newer authentication library for FastAPI applications.

It provides email/password signup and signin, cookie-backed database sessions, password reset, password change, email verification, and current-user dependencies. AuthLoom is beta pre-release software; the beta series is for validating the public API, packaging, docs, and database integration before the first stable release.

Installation

Using uv:

uv add authloom aiosqlite

Using pip:

pip install authloom aiosqlite

aiosqlite is only for the SQLite quickstart below. Install the async database driver your application uses, such as asyncpg for PostgreSQL.

Quickstart

Minimal application wiring. This is not a complete production setup. Applications provide the async SQLAlchemy session factory and own database setup.

from typing import Annotated

from fastapi import Depends, FastAPI
from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker, create_async_engine

from authloom import AuthLoom, AuthLoomConfig, create_auth_router
from authloom.db import User

engine = create_async_engine("sqlite+aiosqlite:///./app.db")
AsyncSessionLocal = async_sessionmaker(
    engine,
    class_=AsyncSession,
    expire_on_commit=False,
)

auth = AuthLoom(config=AuthLoomConfig(session_factory=AsyncSessionLocal))

app = FastAPI()
app.include_router(create_auth_router(auth))


@app.get("/protected")
async def protected_route(
    user: Annotated[User, Depends(auth.require_current_user)],
):
    return {"id": user.id, "email": user.email}

The router defaults to /auth. Use create_auth_router(auth, prefix="/accounts") to choose a different route prefix.

Before using this in an application:

Documentation

Example Application

See the FastAPI credentials-auth reference implementation at https://github.com/sreekarnv/authloom/tree/main/examples/credentials_auth. It runs with SQLite by default or PostgreSQL via DATABASE_URL and Docker Compose.

Development

uv sync --locked --group dev --group test --group docs
uv run ruff check .
uv run pytest tests/unit tests/integration
uv run --locked --group docs mkdocs build --strict
uv build --no-sources

License

AuthLoom is licensed under the Apache License 2.0. See https://github.com/sreekarnv/authloom/blob/main/LICENSE.

Metadata

Release files for authloom 0.1.0b1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for authloom 0.1.0b1
File Size Uploaded
authloom-0.1.0b1.tar.gz 14.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for authloom 0.1.0b1
File Interpreter ABI Platform
authloom-0.1.0b1-py3-none-any.whl Python 3 none any Details

Total release size: 30.6 kB

Release files / authloom-0.1.0b1.tar.gz

Download URL authloom-0.1.0b1.tar.gz
Size 14.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5344c25e7d40f8d0b850e0b998b556b6fc6af38e8f1c71bcfc511f9d4bb0e194
BLAKE2b-256 checksum
How to use checksums
d880fc924cdee45031511cc6773023d104788c839ad9cc4aadaeccc511bdebf1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Release files / authloom-0.1.0b1-py3-none-any.whl

Download URL authloom-0.1.0b1-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6cdbb70fccd622867b2f14a200a74311d8ed32df50f76dc366d2154444c33753
BLAKE2b-256 checksum
How to use checksums
7a91113ff645a6e44d8c38c6ca04d5f5df05638eb9ba3f9a11c8c565992375f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page