propelauth-fastapi
A FastAPI library for managing authentication, backed by PropelAuth
What it is and what it does
This package bridges PropelAuth's cloud-hosted authentication service with FastAPI applications. It provides FastAPI dependency functions that verify access tokens locally (without external requests) and extract user identity and organization membership information. The library handles both required and optional user authentication, and exposes methods to check organization membership, user roles, and permissions within organizations.
The package is designed for B2B and multi-tenant applications where you want to offload authentication UI and credential management to PropelAuth while keeping authorization logic in your FastAPI code. It wraps the underlying propelauth-py client and integrates it with FastAPI's dependency injection system, so you protect routes by adding a dependency parameter rather than writing custom middleware.
Use it for:
- Protect FastAPI routes by requiring a valid user token and extracting the User object for authorization checks.
- Build multi-tenant SaaS applications where you verify users belong to specific organizations and have required roles.
- Implement fine-grained access control by checking user permissions within an organization before allowing an action.
- Create optional authentication endpoints that return user info if a token is present, or an empty response if not.
- Call PropelAuth backend APIs directly (e.g., create magic links, fetch users) from your FastAPI application.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Integrates PropelAuth's authentication and authorization service into FastAPI applications, providing user verification, token validation, and role/permission checking through FastAPI dependencies.
Yes, if you are building a FastAPI application and have committed to using PropelAuth for authentication. The package is actively maintained, has no known vulnerabilities, and low install friction. It is not suitable if you need a self-hosted or alternative authentication provider.
Install
propelauth-fastapi on PyPI
pip
pip install propelauth-fastapiuv
uv add propelauth-fastapipoetry
poetry add propelauth-fastapiInstalling propelauth-fastapi
Before you install
Low friction installation with a pure Python wheel. The package is actively maintained with a recent release (113 days ago) and no known vulnerabilities. Requires current Python versions (3.9+).
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects with minimal obligations.
Quickstart
pip install propelauth_fastapi
from fastapi import FastAPI, Depends
from propelauth_fastapi import init_auth, User
app = FastAPI()
auth = init_auth("YOUR_AUTH_URL", "YOUR_API_KEY")
@app.get("/")
async def root(current_user: User = Depends(auth.require_user)):
return {"user_id": current_user.user_id}
Requires a PropelAuth account and valid AUTH_URL and API_KEY credentials to initialize.
Verify before relying
- Performance characteristics of token verification at scale or under high request volume.
- Compatibility with specific FastAPI versions or async patterns beyond the documented examples.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — fastapi, httpx, propelauth-py, requests |
| Maintenance | actively maintained — 113 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 196,181/month — #9,794 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: propelauth_fastapi-4.4.0-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
propelauth-pyValidates access tokens and manages user…
permissive · top 15,000 on PyPI
fastapi-cloudauthIntegrates FastAPI applications with cloud…
permissive · top 15,000 on PyPI
axioms-fastapiAdds OAuth2/OIDC JWT token validation and…
permissive · top 15,000 on PyPI
fastapi-auth0Integrates Auth0 authentication into FastAPI…
permissive · top 15,000 on PyPI
fastapi-loginAdds session and token-based user…
permissive · top 15,000 on PyPI
authAn HTTP authorization service that answers…
permissive · top 15,000 on PyPI
fastapi-cognitoDecodes, validates, and parses AWS Cognito JWT…
permissive · top 15,000 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
fastapi-keycloak-middlewareFastAPI middleware that integrates Keycloak for…
unclear · top 15,000 on PyPI
fastapi-decoratorsConverts functions into FastAPI-compatible…
permissive · top 15,000 on PyPI