Metadata-Version: 2.3
Name: pytoyoda
Version: 2.3.1
Summary: Python client for Toyota Connected Services.
License: MIT
Keywords: Toyota,Car,MYT
Author: Simon Grud Hansen
Author-email: simongrud@gmail.com
Requires-Python: >=3.9,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: arrow (>=1.1,<2.0)
Requires-Dist: hishel (>=0.0.19,<0.0.20)
Requires-Dist: httpx (>=0.18.1)
Requires-Dist: importlib-metadata (>=7.0.1,<8.0.0)
Requires-Dist: langcodes (>=3.1,<4.0)
Requires-Dist: pydantic (>=2.10.4,<3.0.0)
Requires-Dist: pyjwt (>=2.8.0,<3.0.0)
Project-URL: Bug Tracker, https://github.com/pytoyoda/pytoyoda/issues
Project-URL: Homepage, https://github.com/pytoyoda/pytoyoda
Project-URL: Repository, https://github.com/pytoyoda/pytoyoda
Project-URL: Release Notes, https://github.com/pytoyoda/pytoyoda/releases
Description-Content-Type: text/markdown

![GitHub Workflow](https://img.shields.io/github/actions/workflow/status/pytoyoda/pytoyoda/build.yml)
![Codecov](https://img.shields.io/codecov/c/github/pytoyoda/pytoyoda)
![Commit activity](https://img.shields.io/github/commit-activity/y/pytoyoda/pytoyoda)
![GitHub Release](https://img.shields.io/github/release/pytoyoda/pytoyoda.svg)
![PyPI - Downloads](https://img.shields.io/pypi/dm/pytoyoda)

# Toyota Connected Services Europe Python module

<b><p align=center> 🚨 Breaking changes ahead 🚨 </p></b>

 <p align=center> Version 1.0.0 only supports the new ctpa-oneapi API endpoints that were introduced with the new MyToyota app. Some functions are not yet implemented and must first be determined due to the lack of API documentation. </p>
 <p align=center> Users of the old MyT app should use a mytoyota python module version < 1.0.0. </p>

⚠️ _This is still in beta_

⚠️ _Only EU is supported, other regions are not possible so far. See [this](https://github.com/widewing/toyota-na) for North America_

## Description

Python 3 package to communicate with [Toyota Connected Europe](https://www.toyota-europe.com/about-us/toyota-in-europe/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`.

```text
pip install pytoyoda
```

## 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:

```bash
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/simple_client_example.py
# Create a credentials.json file with {"username":"your@mail.tld","password":"yourpassword"}
python simple_client_example.py
```

## 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.

## Docs

Coming soon...

## 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](https://github.com/DurgNomis-drol),
to ease up on maintenance and the [bus factor](https://en.wikipedia.org/wiki/Bus_factor) for this project.

## Credits

Special thanks go [@DurgNomis-drol](https://github.com/DurgNomis-drol) for starting this project!
A huge thanks go to [@calmjm](https://github.com/calmjm) for making [tojota](https://github.com/calmjm/tojota).

