--- id: descope version: "2.11.2" license: MIT license_treatment: permissive maintenance: active --- # descope — Descope Python SDK License: permissive · Maintenance: active · Downloads: 1.9M/mo ## 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 above — 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 pip install descope uv add descope 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_current - Install friction: low - Maintenance: active - Downloads: 1.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags authentication api client, user management sdk, otp and magic link, sso saml oidc, session validation, python auth backend, descope integration, authentication, identity-management, api-client [View on SkillFed](https://skillfed.io/packages/descope) · [View on PyPI](https://pypi.org/project/descope/)