propelauth-py
A python authentication library
What it is and what it does
PropelAuth Python SDK is a client library that connects your Python backend to PropelAuth's hosted authentication service. It handles token validation, user identity retrieval, and organization-level authorization checks (membership, roles, permissions) without requiring you to implement JWT verification or auth logic yourself. The library wraps HTTP calls to PropelAuth's backend APIs via httpx and requests, and uses pyjwt for token handling.
Typically, you initialize it once with your auth URL and API key, then call validate_access_token_and_get_user on incoming requests to extract and verify the bearer token from the Authorization header. The returned User object lets you inspect organization membership, role hierarchies, and custom permissions. It also exposes direct API methods to create magic links, fetch users, and manage organizations—useful for backend-to-backend operations beyond request validation.
Use it for:
- Protect API routes by validating bearer tokens and extracting authenticated user identity before processing requests.
- Check whether a user belongs to a specific organization and return a 403 error if they do not.
- Verify that a user holds a required role (e.g., Owner, Admin) within an organization before granting access to sensitive operations.
- Enforce fine-grained permissions (e.g., 'can_view_billing') by querying the User object after token validation.
- Generate magic links or manage users and organizations programmatically via the PropelAuth backend API.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Validates access tokens and manages user authentication and authorization for B2B applications backed by PropelAuth, including organization membership, role, and permission checks.
Yes, if you are building a B2B or multi-tenant application and already use or plan to adopt PropelAuth. The library eliminates token validation boilerplate and integrates cleanly with standard Python web frameworks. It is actively maintained, has no known vulnerabilities, and carries a permissive MIT license. Not suitable if you need a standalone auth solution without external service dependency.
Install
propelauth-py on PyPI
pip
pip install propelauth-pyuv
uv add propelauth-pypoetry
poetry add propelauth-pyInstalling propelauth-py
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with a recent release (115 days ago) and a stable commit history.
License in practice
MIT license permits unrestricted use, modification, and distribution in commercial and private projects with only attribution required.
Quickstart
from propelauth_py import init_base_auth
auth = init_base_auth("YOUR_AUTH_URL", "YOUR_API_KEY")
user = auth.validate_access_token_and_get_user("Bearer TOKEN")
print(user.user_id)
Requires Python 3.9 or later and a valid PropelAuth account with auth URL and API key.
Verify before relying
- Whether the PropelAuth backend service itself is required and what its operational costs or availability guarantees are
- Performance characteristics when validating tokens at scale or under high request volume
- Whether token caching or refresh strategies are built in or must be implemented separately
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — httpx, pyjwt, requests |
| Maintenance | actively maintained — 115 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 388,370/month — #7,035 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: propelauth_py-4.4.0-py3-none-any.whl
Tags
More Security packages
Provides Python bindings to the FreeDesktop.org…
permissive · top 1,000 on PyPI
msalMSAL for Python handles OAuth2 and OpenID…
permissive · top 1,000 on PyPI
joserfcjoserfc implements JOSE standards (JWS, JWE,…
permissive · top 1,000 on PyPI
AuthlibAuthlib provides a complete implementation of…
permissive · top 1,000 on PyPI
argon2-cffi-bindingsProvides low-level CFFI bindings to the…
permissive · top 1,000 on PyPI
adalADAL for Python authenticates applications with…
permissive · top 1,000 on PyPI
propelauth-fastapiIntegrates PropelAuth's authentication and…
permissive · top 15,000 on PyPI
PyGithubPyGithub provides Python access to the GitHub…
copyleft · top 1,000 on PyPI
stytchA Python client library for integrating…
permissive · top 5,000 on PyPI
workosA Python client library for the WorkOS API that…
permissive · top 5,000 on PyPI
oneloginOfficial Python SDK for OneLogin's API,…
unclear · top 15,000 on PyPI
pymacaroonsPyMacaroons implements macaroons—bearer…
permissive · top 5,000 on PyPI
authAn HTTP authorization service that answers…
permissive · top 15,000 on PyPI
axioms-fastapiAdds OAuth2/OIDC JWT token validation and…
permissive · top 15,000 on PyPI
cognitojwtDecodes and verifies Amazon Cognito JWT tokens…
permissive · top 15,000 on PyPI
Flask-PrincipalFlask-Principal provides identity and…
permissive · top 15,000 on PyPI