The new SDK is currently in public preview. Install the pre-release explicitly
to try it before the stable release.
Installation
The SDK requires Python 3.11 or later.- uv
- pip
Terminal
Quickstart
Create an organization access token, store it inPOLAR_ACCESS_TOKEN, and make your first request:
main.py
Async client
UsePolarAsync in asynchronous applications:
async_main.py
2026-04 API version.
Context managers
Both clients support context managers to close their HTTP connections automatically when the block exits. For synchronous applications, usePolar with with:
PolarAsync with async with:
Sandbox environment
The client uses production by default. Passenvironment="sandbox" to use the isolated sandbox environment:

