skillfed

descope

Descope Python SDK

descope v2.11.2 1.9M downloads/30d#3,457 on PyPI73
Permissive license MIT Active released

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 descope

uv

uv add descope

poetry

poetry add descope

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Tags

authentication api clientuser management sdkotp and magic linksso saml oidcsession validationpython auth backenddescope integration
authenticationidentity-managementapi-client

More Python Modules packages