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
base_url, the client reads ORVLIN_API_URL.
Options
Check an entitlement
has_access, allocated, consumed, remaining, and source. remaining is None for no cap.
Other cache operations:
Track usage
idempotency_key makes retries count once. timestamp accepts a datetime or an ISO 8601 string, and defaults to now.
Credits
Async
UseAsyncOrvlin in async code. It takes the same arguments as Orvlin, and its methods are awaited:
Errors
Failed calls raiseOrvlinError. Its status attribute holds the HTTP status code when there is one.