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:

OptionDescriptionBest For
Use Descope FlowsDesign 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 SDKsBuild 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 SDKsBuild 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.
Was this helpful?

On this page