Skip to main content
The orvlin package is the Python SDK for server-side code. It mirrors the Node.js SDK: the same entitlement cache, usage tracking, and credit operations, with Python naming. It supports Python 3.9 and later. An async client, AsyncOrvlin, is also included.

Install

Create a client

If you omit base_url, the client reads ORVLIN_API_URL.

Options

Check an entitlement

The result has has_access, allocated, consumed, remaining, and source. remaining is None for no cap. Other cache operations:

Track usage

Pass a list to send several events in one call. Each event’s idempotency_key makes retries count once. timestamp accepts a datetime or an ISO 8601 string, and defaults to now.

Credits

Async

Use AsyncOrvlin in async code. It takes the same arguments as Orvlin, and its methods are awaited:

Errors

Failed calls raise OrvlinError. Its status attribute holds the HTTP status code when there is one.