descope
Descope Python SDK
What it is and what it does
Descope is a Python SDK that wraps Descope's backend authentication and user management APIs. It handles multiple authentication flows—OTP, magic links, enchanted links, OAuth, SAML/OIDC SSO, TOTP, and password-based auth—plus session validation, role and permission checks, tenant management, and audit logging. The SDK depends on httpx for HTTP calls, pyjwt for token handling, certifi for TLS, and email-validator for address validation.
You initialize it with a project ID and optional management key, then call methods like `otp.sign_up()`, `magiclink.verify()`, or `descope_client.manage_users.create()` to drive authentication workflows or administer users and permissions. It's designed for backend services that need to integrate Descope's hosted authentication without building HTTP calls directly.
Use it for:
- Add passwordless OTP or magic-link sign-up/sign-in to a Python web service.
- Validate session JWTs and check user roles/permissions on incoming requests.
- Manage users, tenants, and access keys programmatically from your backend.
- Integrate SAML or OIDC SSO into a Python application via Descope.
- Implement cross-device authentication flows using enchanted links.
- Query audit logs and manage fine-grained authorization policies.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Descope SDK provides Python backend access to Descope's user management and authentication APIs, supporting OTP, magic links, OAuth, SSO, TOTP, passwords, and session validation.
Yes. Active maintenance, low install friction, no known vulnerabilities, permissive MIT license, and broad Python version support (3.9–3.14) make it a safe choice. Install it if you are building a backend service that needs to integrate Descope's authentication and user management APIs.
Install
descope on PyPI
pip
pip install descopeuv
uv add descopepoetry
poetry add descopeInstalling descope
Before you install
Low install friction with a pure Python wheel. Active maintenance—released 4 days ago with recent commits. Supports current Python versions (3.9 through 3.14).
License in practice
MIT license permits commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install descope
from descope import DescopeClient, DeliveryMethod
descope_client = DescopeClient(project_id="your-project-id")
masked_address = descope_client.otp.sign_up(
method=DeliveryMethod.EMAIL,
login_id="user@example.com",
user={"name": "User Name"}
)
Requires DESCOPE_PROJECT_ID environment variable or explicit project_id parameter; optional DESCOPE_AUTH_MANAGEMENT_KEY for disabled authentication APIs.
Verify before relying
- Whether Flask decorator support requires separate installation or is bundled by default.
- Rate limiting specifics and quota enforcement behavior.
- Whether the SDK handles token refresh automatically or requires manual management.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — httpx, certifi, pyjwt, email-validator |
| Maintenance | actively maintained — 4 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,893,477/month — #3,457 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: descope-2.11.2-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
stytchA Python client library for integrating…
permissive · top 5,000 on PyPI
python3-samlTurns a Python application into a SAML 2.0…
permissive · top 5,000 on PyPI
social-auth-coreProvides a core framework for integrating…
permissive · top 5,000 on PyPI
supabase-authA Python client library for Supabase Auth that…
permissive · top 1,000 on PyPI
djangosaml2idp2Implements the SAML 2.0 Identity Provider side…
permissive · top 15,000 on PyPI
authyPython client for the Twilio Authy two-factor…
permissive · top 15,000 on PyPI
django-magiclinkAdds passwordless email-based authentication to…
permissive · top 15,000 on PyPI
social-auth-app-djangoIntegrates social authentication and…
permissive · top 5,000 on PyPI
django-auth-adfsIntegrates Django applications with Microsoft…
permissive · top 15,000 on PyPI
flask-oidcAdds OpenID Connect authentication support to…
permissive · top 5,000 on PyPI