Metadata-Version: 2.4
Name: pytoyoda
Version: 4.1.0
Summary: Python client for Toyota Connected Services Europe.
License-Expression: MIT
License-File: LICENSE
Keywords: Toyota,Car,MYT
Author: CM000n
Author-email: simon.hoerrle@gmail.com
Requires-Python: >=3.9,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
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
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: arrow (>=1.1,<2.0)
Requires-Dist: hishel (>=0.1.0,<0.2.0)
Requires-Dist: httpx (>=0.28.1,<0.29.0)
Requires-Dist: importlib-metadata (>=8.0.0,<9.0.0)
Requires-Dist: langcodes (>=3.1,<4.0)
Requires-Dist: loguru (>=0.7.3,<0.8.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://pytoyoda.github.io/pytoyoda/pytoyoda.html
Project-URL: Repository, https://github.com/pytoyoda/pytoyoda
Project-URL: Release Notes, https://github.com/pytoyoda/pytoyoda/releases
Description-Content-Type: text/markdown

[![License](https://img.shields.io/github/license/pytoyoda/pytoyoda)](LICENSE)
[![PyPI version](https://img.shields.io/pypi/v/pytoyoda?logo=pypi&logoColor=white&label=PyPI)](https://pypi.org/project/pytoyoda/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pytoyoda?logo=python&logoColor=white&label=Python)](https://pypi.org/project/pytoyoda/)
[![Github Actions Build](https://img.shields.io/github/actions/workflow/status/zyf722/poetry-plugin-migrate/build.yml?logo=github)](https://github.com/zyf722/poetry-plugin-migrate/actions/workflows/build.yml)
[![Code Coverage](https://img.shields.io/codecov/c/github/pytoyoda/pytoyoda?logo=codecov&logoColor=white)](https://app.codecov.io/github/pytoyoda/pytoyoda/)
[![CodeQL](https://github.com/pytoyoda/pytoyoda/actions/workflows/codeql.yml/badge.svg)](https://github.com/pytoyoda/pytoyoda/actions/workflows/codeql.yml)

# Toyota Connected Services Europe Python module

⚠️ _This is still in beta_
⚠️ _Only EU is supported, other regions are not possible so far._

## Summary

- [Toyota Connected Services Europe Python module](#toyota-connected-services-europe-python-module)
  - [Description](#description)
  - [Installation](#installation)
  - [Docs](#docs)
  - [Usage](#usage)
  - [Known issues](#known-issues)
  - [Contributing](#contributing)
  - [Note](#note)
  - [Credits](#credits)

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

```bash
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:

```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/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](https://pytoyoda.github.io/pytoyoda/pytoyoda/models/vehicle.html).

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

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

