Client Setup

Configure the Limitry Python client

Configure the Limitry Python client with your API key and options.

Basic Setup

from limitry import Client

client = Client(api_key="your-api-key")

Configuration Options

client = Client(
    api_key="your-api-key",
    base_url="https://api.limitry.com/v1",  # Custom base URL
    timeout=60,  # Request timeout in seconds
    headers={"X-Custom-Header": "value"},  # Custom headers
)

Using Environment Variables

import os
from limitry import Client

client = Client(api_key=os.getenv("LIMITRY_API_KEY"))

Async Context Manager

The client should be used with an async context manager:

async with Client(api_key="your-api-key") as client:
    # Use the client here
    pass

Next Steps

On this page