polar-sdk is the official Python client for the Polar API, with synchronous and asynchronous clients. It requires Python 3.11 or later.
Install
- uv
- pip
Terminal
Create a client
Create an organization access token in Settings → Access Tokens, or runpolar auth token, and store it in POLAR_ACCESS_TOKEN. Then make your first request:
main.py
2026-10: its types and the Polar-Version header it sends. See SDKs.
Async client
UsePolarAsync in asynchronous applications:
async_main.py
with Polar(...) and async with PolarAsync(...), and close their HTTP connections when the block exits.
Options
List resources
List methods return one page.iter_list yields every item across pages:
Handle errors
Every SDK error extendspolar.PolarError. Errors the API documents, such as ResourceNotFound, have their own classes in polar.v2026_10.errors:
Verify webhooks
validate_event checks the signature and returns a typed event:
Send usage events
polar.events.ingest sends a list of usage events in one request:

