Python Quickstart
This guide will help you integrate Descope's Python SDK into your backend application. Follow the steps below to get started.
Use this pre-built prompt to get started faster.
Which Client Do You Need?
Use DescopeClient for most apps. Use DescopeClientAsync if you're on asyncio (FastAPI, aiohttp, etc.).
Both live in the same package and expose the same method names. With the async client, you will need to await the network calls.
Additional Resources
Have You Implemented the Frontend Yet?
When integrating Descope into your application, you have three options depending on how much control you want over your frontend authentication experience and session management:
| Option | Description | Best For |
|---|---|---|
| Use Descope Flows | Design your authentication screens and flows visually in the Descope Console with little or no frontend code. We handle all session management for you. | Fastest setup with minimal custom frontend work. |
| Use Descope Client SDKs | Build your own login screens and authentication experiences in your frontend using code, while relying on Descope's SDKs to manage sessions (login, logout, refresh). | Customizable UX with simplified session handling. |
| Use Descope Backend SDKs | Build your own frontend and your own backend APIs for authentication. You fully manage sessions, tokens, and authentication logic yourself. | Maximum flexibility and control, at the cost of more engineering effort. |
Descope Flows
Design login screens and authentication flows visually without writing code, and embed them into your app.
Descope Client SDKs
Build custom login screens in your frontend using code, while we manage session tokens and refreshing for you.