Python integration guides

Add Authdog to your Python backend

One package, authdog-fastapi, ships idiomatic bindings for FastAPI, Flask, Django, Starlette, and aiohttp over one shared core. Start with authentication, then layer on access control.

app.py
from authdog.fastapi import Authdog
 
authdog = Authdog(
public_key=os.environ["PK_AUTHDOG"]
)
 
@app.get("/me")
async def me(user):
return {"id": user.sub}