--- id: propelauth-py version: "4.4.0" license: MIT license_treatment: permissive maintenance: active --- # propelauth-py — A python authentication library License: permissive · Maintenance: active · Downloads: 388.4K/mo ## 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 above — 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 pip install propelauth-py uv add propelauth-py 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_current - Install friction: low - Maintenance: active - Downloads: 388.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags authentication library python, access token validation, b2b user authorization, organization role permissions, propelauth integration, multi-tenant auth, jwt token verification, b2b-auth, multi-tenant, token-validation [View on SkillFed](https://skillfed.io/packages/propelauth-py) · [View on PyPI](https://pypi.org/project/propelauth-py/)