Skip to main content
The Limitly Python SDK provides a simple and powerful way to integrate rate limiting into your Python application.

Installation

Pip

Poetry

Pipenv

Requirements

  • Python 3.8 or higher
  • requests >= 2.25.0

Basic Setup

Import and initialize the SDK:

Configuration Options

The SDK accepts the following configuration options:
api_key
string
required
Your Limitly API key. You can find this in your Limitly dashboard.
base_url
string
The base URL for the Limitly API. Defaults to https://api.limitly.dev.
timeout
int
Request timeout in seconds. Defaults to 30 seconds.

Example Configuration

Environment Variables

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

Async Support

The Python SDK supports both synchronous and asynchronous operations:

CLI Tool

The SDK includes a command-line interface for testing and management:

Development Installation

For development and testing:

Type Hints

The SDK includes comprehensive type hints for better IDE support:

Next Steps