Skip to main content

Python client for Toyota Connected Services Europe.

Project description

License PyPI version PyPI - Python Version Github Actions Build Code Coverage CodeQL

Toyota Connected Services Europe Python module

⚠️ This is still in beta ⚠️ Only EU is supported, other regions are not possible so far.

Summary

Description

Python 3 package to communicate with Toyota Connected Europe Services. This is an unofficial package and Toyota can change their API at any point without warning.

Installation

This package can be installed through pip.

pip install pytoyoda

Docs

https://pytoyoda.github.io/pytoyoda/pytoyoda.html

Usage

For a quick start on how to use the package take a look at the simple_client_example.py file contained in the report. You can also use and execute this file directly by using the following commands:

python -m venv pytoyoda
source pytoyoda/bin/activate
python -m pip install "pytoyoda@git+https://github.com/pytoyoda/pytoyoda@main"
curl -LO https://raw.githubusercontent.com/pytoyoda/pytoyoda/main/sandbox/simple_client_example.py
# Create a credentials.json file with {"username":"your@mail.tld","password":"yourpassword"}
python simple_client_example.py

Please note that the simple_client_example.py file is only to be regarded as a playground and is intended to provide an initial insight into the possibilities. It is not an officially supported interface of the pytoyoda API! For an overview of the current official interfaces, please take a look at our documentation.

Known issues

  • Statistical endpoint will return None if no trip have been performed in the requested timeframe. This problem will often happen at the start of each week, month or year. Also daily stats will of course also be unavailable if no trip have been performed.
  • Currently, it is only possible to get various vehicle information. Functions for controlling and setting vehicle properties have not yet been implemented.
  • GET /v1/global/remote/status (used by Vehicle.lock_status) returns 429 APIGW-403 "Unauthorized" frequently, often without obvious correlation to call rate. Empirically, issuing POST /v1/global/remote/refresh-status first - the same wake the Toyota Android app uses - improves the success rate of subsequent GETs and gives fresher occurrence_date payloads, suggesting at least some of the 429s come from a stale or empty server-side cache rather than rate-limiting. Other 429s appear to be unrelated to cache state and happen seemingly at random; pytoyoda retries those with exponential backoff. Call Vehicle.refresh_status() first, then poll Vehicle.update(only=["status"]) until lock_status.last_updated advances.

Contributing

This python module uses poetry (>= 2.0.0) and pre-commit.

To start contributing, fork this repository and run poetry install. Then create a new branch. Before making a PR, please run pre-commit poetry run pre-commit run --all-files and make sure that all tests passes locally first by running pytest tests/.

Note

This is a friendly community fork of the original project by @DurgNomis-drol, to ease up on maintenance and the bus factor for this project.

Credits

Special thanks go @DurgNomis-drol for starting this project! A huge thanks go to @calmjm for making tojota.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytoyoda-5.1.0.tar.gz (49.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytoyoda-5.1.0-py3-none-any.whl (65.0 kB view details)

Uploaded Python 3

File details

Details for the file pytoyoda-5.1.0.tar.gz.

File metadata

  • Download URL: pytoyoda-5.1.0.tar.gz
  • Upload date:
  • Size: 49.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pytoyoda-5.1.0.tar.gz
Algorithm Hash digest
SHA256 3361281acfefd87d58b07f7ff6529003e1be50460b47d2c73b7aca85fa7865f7
MD5 e436f054459e5db08595232b5dd4aec2
BLAKE2b-256 da8a0c0c7b6e322a1c01ed804e34168fa7421b0945630522afac272d627ac864

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytoyoda-5.1.0.tar.gz:

Publisher: python-publish.yml on pytoyoda/pytoyoda

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pytoyoda-5.1.0-py3-none-any.whl.

File metadata

  • Download URL: pytoyoda-5.1.0-py3-none-any.whl
  • Upload date:
  • Size: 65.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pytoyoda-5.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b5f8471cca1d9c8e0594a550f672d2f26c875c5b580d0f8199a6ce41621f4815
MD5 ba3a6c082271496997ee929c9ea24fca
BLAKE2b-256 e77816f2184f288674b3c47e5217ec03b5bc591c543650c8e1c907c75de72e8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytoyoda-5.1.0-py3-none-any.whl:

Publisher: python-publish.yml on pytoyoda/pytoyoda

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page