Metadata-Version: 2.1
Name: myskoda
Version: 0.7.2
Summary: Library for interaction with the MySkoda APIs.
Author: Frederick Gnodtke
Author-email: frederick@gnodtke.net
Requires-Python: >=3.12.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Provides-Extra: cli
Provides-Extra: docs
Requires-Dist: aiohttp (>=3,<4)
Requires-Dist: asyncclick (>=8.1.7.2,<9.0.0.0) ; extra == "cli"
Requires-Dist: asyncio (>=3,<4)
Requires-Dist: asyncio-paho (>=0.6.0,<0.7.0)
Requires-Dist: coloredlogs (>=15.0.1,<16.0.0) ; extra == "cli"
Requires-Dist: mashumaro[orjson] (>=3.13.1,<4.0.0)
Requires-Dist: mkdocs-gen-files (>=0.5.0,<0.6.0) ; extra == "docs"
Requires-Dist: mkdocs-literate-nav (>=0.6.1,<0.7.0) ; extra == "docs"
Requires-Dist: mkdocs[gen-files] (>=1.6.1,<2.0.0) ; extra == "docs"
Requires-Dist: mkdocstrings[python] (>=0.26.1,<0.27.0) ; extra == "docs"
Requires-Dist: paho-mqtt (>=1,<2)
Requires-Dist: pygments (>=2.18.0,<3.0.0) ; extra == "cli"
Requires-Dist: pyjwt (>=2,<3)
Requires-Dist: pyyaml (>=6,<7)
Requires-Dist: termcolor (>=2.4.0,<3.0.0) ; extra == "cli"
Description-Content-Type: text/markdown

[![Version](https://img.shields.io/github/v/release/skodaconnect/myskoda?include_prereleases)](https://github.com/skodaconnect/myskoda/releases)
[![PyPi](https://img.shields.io/pypi/v/myskoda?label=latest%20pypi)](https://pypi.org/project/myskoda/)
[![Downloads PyPi](https://img.shields.io/pypi/dm/myskoda)](https://pypi.org/project/myskoda/)
[![Docs](https://readthedocs.org/projects/myskoda/badge/?version=latest)](https://myskoda.readthedocs.io/en/latest/)
[![Discord](https://img.shields.io/discord/877164727636230184)](https://discord.gg/t7az2hSJXq)
[![Coverage Status](https://coveralls.io/repos/github/skodaconnect/myskoda/badge.svg)](https://coveralls.io/github/skodaconnect/myskoda)

# MySkoda

This Python library can be used to work with the MySkoda API.
<!-- TOC -->

- [MySkoda](#myskoda)
    - [Get In Touch](#get-in-touch)
    - [Quick Start](#quick-start)
        - [Basic example](#basic-example)
    - [Documentation](#documentation)
    - [As Library](#as-library)
    - [As CLI](#as-cli)

<!-- /TOC -->

## Get In Touch

We have an active community in our discord. [Feel free to join](https://discord.gg/t7az2hSJXq).

If you have any issues, please report them in our issue tracker.

## Quick Start

The MySkoda package is published to Pypi and can be found [here](https://pypi.org/project/myskoda/).

It can be installed the usual way:

```sh
pip install myskoda
```

### Basic example

```python
from aiohttp import ClientSession
from myskoda import MySkoda

session = ClientSession()
myskoda = MySkoda(session)
await myskoda.connect(email, password)

for vin in await myskoda.list_vehicle_vins():
    print(vin)

myskoda.disconnect()
await session.close()
```

## Documentation

Detailed documentation [is available at read the docs](https://myskoda.readthedocs.io/en/latest/):
* [Fetching Data](https://myskoda.readthedocs.io/en/latest/fetching_data/)
* [Subscribing to Events](https://myskoda.readthedocs.io/en/latest/events/)
* [Primer](https://myskoda.readthedocs.io/en/latest/primer/)

## As Library

MySkoda relies on [aiohttp](https://pypi.org/project/aiohttp/) which must be installed.
A `ClientSession` must be opened and passed to `MySkoda` upon initialization.

After connecting, operations can be performed, events can be subscribed to and data can be loaded from the API.

Don't forget to close the session and disconnect MySkoda after you're done.

## As CLI

The MySkoda package features a CLI.
You will have to install it with extras `cli`:

```sh
pip install myskoda[cli]
```

Afterwards, the CLI is available in your current environment by invoking `myskoda`.

Username and password must be provided to the CLI for every request as options, before selecting a sub command:

```sh
myskoda --user "user@example.com" --password "super secret" list-vehicles
```

Help can be accessed the usual way:

```sh
myskoda --help
```

