Volvo Connected Vehicle API
This is an unofficial Python client for the Volvo Connected Vehicle API. It is based on the official API documentation.
Source: svrooij/py_volvo_connected
Installation
pip install volvo-connected
Usage
from kiota_http.httpx_request_adapter import HttpxRequestAdapter
from volvo_connected import (
StaticAccessTokenProvider,
# DynamicAccessTokenProvider,
VolvoAuthenticationProvider,
VolvoConnectedClient
)
# Create an access token provider using a static access token
access_token_provider = StaticAccessTokenProvider("YOUR_ACCESS_TOKEN")
# Or explore the DynamicAccessTokenProvider that allows you to auto refresh the token
# def access_token_function(url: str) -> str:
# # Implement your logic to get the access token using the URL
# return "your_dynamic_access_token"
# access_token_provider = DynamicAccessTokenProvider(access_token_function)
# Create an authentication provider using your VCC API key and the access token provider
auth_provider = VolvoAuthenticationProvider("YOUR_VCC_API_KEY", access_token_provider)
# Create a client with a request adapter that has the authentication provider
client = VolvoConnectedClient(HttpxRequestAdapter(auth_provider))
Get all vehicles
vehicles = await client.vehicles.get()
Get vehicle by VIN
vehicle = await client.vehicles.by_vin("YV4952NA4F120DEMO").get()
Get Fuel or Battery level
fuel_resp = await client.vehicles.by_vin("YV4952NA4F120DEMO").fuel.get()
fuel_resp.data.fuel_amount.value
# or
fuel_resp.data.battery_charge_level.value
All other endpoints
This client is genereted based on the (adjusted) OpenAPI specification. And everything is strong typed, so go ahead and explore the API.
Metadata
Release files for volvo-connected 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| volvo_connected-0.2.0.tar.gz | 55.7 kB | Without provenance | Details for volvo_connected-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| volvo_connected-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for volvo_connected-0.2.0-py3-none-any.whl |
Total release size: 153.2 kB
Release files / volvo_connected-0.2.0.tar.gz
| Download URL | volvo_connected-0.2.0.tar.gz |
|---|---|
| Size | 55.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7251672e2572856728adcdbc07bc74d5f9976b8bbee900453c3576680de9d23b
|
|
BLAKE2b-256 checksum How to use checksums |
6fe0e06054cceb577836b4e4604d928b8bf87836de1b90ff2fb0c488ced22a9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Release files / volvo_connected-0.2.0-py3-none-any.whl
| Download URL | volvo_connected-0.2.0-py3-none-any.whl |
|---|---|
| Size | 97.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7af960032bbe33ec53230f634754f98aa8044a04a3e24eec5cb16741d5c7609e
|
|
BLAKE2b-256 checksum How to use checksums |
0b41245b8388aa9827923c775e5bd7453a0ef373fb95075c5326e4e0527a8237
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Security for volvo-connected 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.