{"library":"propelauth-fastapi","title":"PropelAuth FastAPI","description":"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.","language":"python","status":"active","last_verified":"Mon Apr 27","install":{"commands":["pip install propelauth-fastapi"],"cli":null},"imports":["from propelauth_fastapi import PropelAuth","from propelauth_fastapi import get_user"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from fastapi import FastAPI, Depends\nfrom propelauth_fastapi import PropelAuth, get_user\n\napp = FastAPI()\n\nauth = PropelAuth(\n    auth_url=\"https://your-tenant.auth.us.authok.io\",\n    api_key=\"your-api-key\"\n)\n\n@app.get(\"/protected\")\nasync def protected_route(user = Depends(auth.require_user)):\n    return {\"message\": f\"Hello {user.email}\"}\n\n@app.get(\"/current-user\")\nasync def current_user(user = Depends(get_user)):\n    return user\n","lang":"python","description":"Initialize PropelAuth with your tenant credentials and protect routes using require_user dependency.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}