workos
WorkOS Python Client
What it is and what it does
WorkOS is a typed Python client for the WorkOS platform, which provides enterprise identity, organization, and authorization infrastructure. It wraps the WorkOS REST API with a namespace-based interface (e.g., client.sso, client.organizations, client.user_management) and supports both synchronous and asynchronous HTTP calls via httpx. The library handles pagination automatically, includes typed exception classes for different HTTP error codes, and ships with full type annotations for IDE support and static type checking.
The client reads credentials from environment variables or explicit parameters, automatically retries requests with exponential backoff on transient failures, and attaches idempotency keys to POST requests. It covers a broad API surface—SSO, user and organization management, directory sync, audit logs, fine-grained authorization (FGA), feature flags, webhooks, MFA, and more—making it suitable for applications that need to integrate WorkOS services without building HTTP calls by hand.
Use it for:
- Integrate WorkOS SSO into a Python web application to authenticate users via SAML, OAuth, or other enterprise protocols.
- Build an admin panel that creates, lists, and manages organizations and their memberships using the organizations and organization_membership namespaces.
- Implement directory sync to pull users and groups from an external directory (LDAP, Active Directory) into your application.
- Set up fine-grained authorization (FGA) to define roles, permissions, and access checks for multi-tenant or complex permission models.
- Verify webhook signatures and process WorkOS events (e.g., user created, organization updated) in your application.
- Generate feature flags and manage targeting rules for A/B testing or gradual feature rollouts.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python client library for the WorkOS API that provides typed access to identity, organization, directory sync, and authorization services over HTTP.
Yes. The library is actively maintained (release 3 days old), has low install friction, carries no known vulnerabilities, and uses a permissive MIT license. It is well-suited for any Python application integrating WorkOS services. The only constraint is Python 3.10+; if your project targets an older version, you cannot use it.
Install
workos on PyPI
pip
pip install workosuv
uv add workospoetry
poetry add workosInstalling workos
Before you install
Low install friction with a pure-Python wheel. Actively maintained with a release 3 days old. Requires Python 3.10+. Dependencies are all stable, widely-used libraries (cryptography, httpx, pyjwt, typing-extensions).
License in practice
MIT license is permissive; you can use this library in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install workos
from workos import WorkOSClient
client = WorkOSClient(api_key="sk_1234", client_id="client_1234")
page = client.organizations.list_organizations()
for org in page.auto_paging_iter():
print(org.name)
Requires Python 3.10 or later.
Verify before relying
- Whether the auto-retry behavior (up to 3 times on 429/5xx) and exponential backoff meet your application's resilience needs.
- Whether the 60-second default HTTP timeout is appropriate for your use case or if you'll need per-request overrides.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — cryptography, httpx, pyjwt, typing-extensions |
| Maintenance | actively maintained — 3 days since the last release |
| First released | |
| Downloads | 5,685,385/month — #2,054 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: workos-10.2.0-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
pipedreamProvides a Python client library for accessing…
unclear · top 15,000 on PyPI
onfido-pythonOfficial Python client library for the Onfido…
permissive · top 5,000 on PyPI
python-freeipapython-freeipa is a lightweight client library…
permissive · top 15,000 on PyPI
globus-sdkProvides a Python interface to Globus APIs for…
permissive · top 15,000 on PyPI
python-openidImplements OpenID authentication for Python…
permissive · top 15,000 on PyPI
propelauth-pyValidates access tokens and manages user…
permissive · top 15,000 on PyPI
pyxeroPyXero is a Python client library for the Xero…
permissive · top 15,000 on PyPI
requests-oauthlibAdds OAuth 1 and OAuth 2 authentication support…
permissive · top 1,000 on PyPI
egnyteOfficial Python client library for Egnyte's…
permissive · top 15,000 on PyPI
pydiscourseA Python client library for the Discourse API…
permissive · top 15,000 on PyPI