Client¶
polestar_api.client ¶
Main entry point for the Polestar API client.
PolestarApi ¶
PolestarApi(email: str, password: str, *, token_store: TokenStore | None = None)
Async client for the Polestar vehicle API.
Usage::
async with PolestarApi(email="...", password="...") as api:
vehicles = await api.get_vehicles()
battery = await vehicles[0].get_battery()
if battery is not None:
print(battery.charge_level)
async_init
async
¶
async_init() -> None
Authenticate and discover endpoints. Must be called before use.