skillfed

propelauth-py

A python authentication library

propelauth-py v4.4.0 388.4K downloads/30d#7,035 on PyPI13
Permissive license MIT Active released

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-py

uv

uv add propelauth-py

poetry

poetry add propelauth-py

Installing 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

authentication library pythonaccess token validationb2b user authorizationorganization role permissionspropelauth integrationmulti-tenant authjwt token verification
b2b-authmulti-tenanttoken-validation

More Security packages