Async Python client for EV Tracker API
Project description
aioevtracker
Async Python client for EV Tracker API.
Installation
pip install aioevtracker
Usage
import asyncio
from aioevtracker import EVTrackerClient
async def main():
async with EVTrackerClient(api_key="your-api-key") as client:
# Get all cars
cars = await client.get_cars()
for car in cars:
print(f"{car.name} (ID: {car.id})")
# Get charging statistics
state = await client.get_state()
print(f"Monthly energy: {state.monthly_energy} kWh")
print(f"Monthly cost: {state.monthly_cost} CZK")
# Log a charging session
session = await client.log_session_simple(
energy_kwh=45.5,
energy_source="GRID",
rate_type="LOW",
)
print(f"Logged session ID: {session.id}")
asyncio.run(main())
With existing aiohttp session
import aiohttp
from aioevtracker import EVTrackerClient
async with aiohttp.ClientSession() as session:
client = EVTrackerClient(
api_key="your-api-key",
session=session,
)
cars = await client.get_cars()
API Reference
EVTrackerClient
get_cars()- Get list of user's carsget_default_car()- Get default carget_state()- Get Home Assistant state with statisticslog_session(...)- Log a charging session with full controllog_session_simple(...)- Log a charging session with smart defaultsvalidate_api_key()- Validate the API key
Models
Car- Electric vehicleChargingSession- Charging sessionHomeAssistantState- Statistics state
Exceptions
EVTrackerApiError- Base exceptionEVTrackerAuthenticationError- Invalid API key (401/403)EVTrackerConnectionError- Connection failedEVTrackerRateLimitError- Rate limit exceeded (429)
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aioevtracker-0.1.0.tar.gz.
File metadata
- Download URL: aioevtracker-0.1.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb258aeaf154b2af86d0dc9782bd9236b59ca04f93542cf202e497a2119dfd2b
|
|
| MD5 |
2eb21d935791ffeaa8d4ffec52e63214
|
|
| BLAKE2b-256 |
16aa390df187ce7ad884aca44b3ad68d758a8fff8c6726461f7a46070d1dfeba
|
Provenance
The following attestation bundles were made for aioevtracker-0.1.0.tar.gz:
Publisher:
publish.yml on petrmac/aio-evtracker
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aioevtracker-0.1.0.tar.gz -
Subject digest:
bb258aeaf154b2af86d0dc9782bd9236b59ca04f93542cf202e497a2119dfd2b - Sigstore transparency entry: 737850095
- Sigstore integration time:
-
Permalink:
petrmac/aio-evtracker@d3d46a16bf9f95da76490d532318a2d598e9522a -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/petrmac
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d3d46a16bf9f95da76490d532318a2d598e9522a -
Trigger Event:
push
-
Statement type:
File details
Details for the file aioevtracker-0.1.0-py3-none-any.whl.
File metadata
- Download URL: aioevtracker-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2173d6bb820c72d4bf85a253c34fddbc3dbffb44406114b7e16b5789d1b005e2
|
|
| MD5 |
2c70b5da1236f97dba487af5d98b2341
|
|
| BLAKE2b-256 |
ce1df4a844759c3c89be517e4f6436a0a1cf6c187e4306f74fb5476200b30ad9
|
Provenance
The following attestation bundles were made for aioevtracker-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on petrmac/aio-evtracker
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aioevtracker-0.1.0-py3-none-any.whl -
Subject digest:
2173d6bb820c72d4bf85a253c34fddbc3dbffb44406114b7e16b5789d1b005e2 - Sigstore transparency entry: 737850096
- Sigstore integration time:
-
Permalink:
petrmac/aio-evtracker@d3d46a16bf9f95da76490d532318a2d598e9522a -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/petrmac
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d3d46a16bf9f95da76490d532318a2d598e9522a -
Trigger Event:
push
-
Statement type: