Skip to main content
The Limitly Python SDK uses API key authentication to interact with the Limitly API.

API Key Setup

To use the SDK, you need a Limitly API key. You can get one from your Limitly Dashboard.

Basic Authentication

Initialize the SDK with your API key:

Environment Variables

For security, store your API key in environment variables:
Then use it in your application:

FastAPI Example

Here’s how to use authentication in a FastAPI application:

Flask Example

Here’s how to use authentication in a Flask application:

Django Example

Here’s how to use authentication in a Django application:

Error Handling

The SDK provides comprehensive error handling:

Custom Headers

You can customize how API keys are extracted from requests:

Testing Authentication

Test your authentication setup:

CLI Authentication

Test authentication using the CLI tool:

Next Steps