Frontegg is a web platform for SaaS companies to integrate managed SaaS features like authentication, authorization, and user management. The Python SDK, currently at version 3.0.4, provides tools to validate tokens, manage users, and integrate Frontegg services into Python applications. It's actively maintained with updates released based on feature development and bug fixes.
pip install fronteggVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to configure and initialize the Frontegg Python SDK. It sets global configuration parameters using `FronteggConfig` class attributes and then creates an instance of `FronteggContext`, which uses these settings. While actual token validation or service calls require a valid JWT, this example ensures the basic setup is correct and environment variables are honored.
Review the official migration guide for v3.0.0. Update imports to use `from frontegg.frontegg import FronteggContext` and configure settings via `FronteggConfig` class attributes. Replace `sanity_middleware` usage with `FronteggConfig.middleware_access_strategy`.
Be aware of the global nature of `FronteggConfig`. For multi-tenant scenarios requiring isolated configurations, consider running separate processes or carefully managing configuration changes, though dynamically changing global settings per request is generally not recommended.
When using Frontegg SDK outside of framework decorators (`@with_authentication`), ensure that any potentially blocking network calls are either `await`ed in an `async` function or handled in a separate thread if your application is synchronous.