Python SDK

Track usage, manage quotas, and enforce rate limits with Python

The Limitry Python SDK provides a simple, type-safe way to integrate usage tracking and quota management into your Python applications.

Common Tasks

Quick Start

from limitry import Limitry

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

# Track usage
client.track(
    customer_id="cust_123",
    event="api_call",
    value=1
)

# Check quota
result = client.check_quota(
    customer_id="cust_123",
    quota_id="api_calls"
)

if result.allowed:
    # Proceed with the operation
    pass

Learn the Concepts

New to usage metering? Start with the fundamentals:

On this page