Registry / auth-security / propelauth-fastapi

propelauth-fastapi

JSON →
library4.4.0pypypi✓ verified 85d ago

A FastAPI library for managing authentication, backed by PropelAuth. Current version is 4.4.0, requires Python >=3.9. Regularly updated with new APIs and improvements.

pip install propelauth-fastapi
INSTALL
IMPORT
SIG · PROPELAUTH-FASTAPI
P
propelauth-fastapi
auth-securitypythonv4.4.0
Install
5.6s avg
Import
Disk
52MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.4.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 53.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 5.6s · import 0.000s · 53MB
52MB installed
● package 52MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FastAPIAuth
from propelauth_fastapi import FastAPIAuth
from propelauth_fastapi import PropelAuth
FastAPIAuthAsync
from propelauth_fastapi import FastAPIAuthAsync
Depends
from propelauth_fastapi import Depends

Initialize PropelAuth with your tenant credentials and protect routes using require_user dependency.

from fastapi import FastAPI, Depends from propelauth_fastapi import PropelAuth, get_user app = FastAPI() auth = PropelAuth( auth_url="https://your-tenant.auth.us.authok.io", api_key="your-api-key" ) @app.get("/protected") async def protected_route(user = Depends(auth.require_user)): return {"message": f"Hello {user.email}"} @app.get("/current-user") async def current_user(user = Depends(get_user)): return user
Debug
Known issues
breakingIn v4.0.0, the library was rewritten to depend on propelauth-py. The initialization API changed: now pass auth_url and api_key directly instead of using PropelAuthConfig.
fix
Replace PropelAuthConfig(...) with PropelAuth(auth_url=..., api_key=...).
affects: <4.0.0
deprecatedThe get_user dependency is deprecated as of v4.4.0. Use require_user or the new user retrieval methods.
fix
Replace Depends(get_user) with Depends(auth.require_user).
affects: >=4.4.0
gotchaThe auth_url must include the full URL with tenant subdomain, e.g., 'https://your-tenant.auth.us.authok.io'. Missing 'https://' or the tenant part will cause cryptic authentication errors.
fix
Ensure auth_url is a valid URL string starting with https://.
affects: all
Upgrade
Version history
4.4.0latest on PyPI · released Apr 23, 2026
Audit
Dependencies
fastapirequiredRequired for building FastAPI applications
propelauth-pyrequiredCore PropelAuth Python SDK
Agent activity
25 hits · last 30 days
node
22
OpenAI (training)
2
Resources
propelauth-fastapi — pip install propelauth-fastapi · libregistry