Skip to main content

Library for interaction with the MySkoda APIs.

Project description

Version PyPi Downloads PyPi Docs Discord Coverage Status

MySkoda

This Python library can be used to work with the MySkoda API.

Get In Touch

We have an active community in our discord. Feel free to join.

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.

It can be installed the usual way:

pip install myskoda

Basic example

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:

As Library

MySkoda relies on 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:

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:

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

Help can be accessed the usual way:

myskoda --help

Contribute your Fixtures

Please contribute fixtures for our tests by running this command:

# Export all endpoints for all vehicles.
myskoda \
    --user user \
    --password password \
    gen-fixtures \
        --name my_cars \
        --description "My cars in no specific state."
        --vehicle all \
        get all

It is also possible to just contribute a single vehicle:

# Export all endpoints for a specific vehicle.
myskoda \
    --user user \
    --password password \
    gen-fixtures \
        --name my_favorite_car \
        --description "My favorite car in no specific state."
        --vehicle TMOCKAA0AA000000 \
        get all

Or even narrow down to an inidividual endpoint for an individual vehicle:

# Export a specific endpoint for a specific vehicle.
myskoda \
    --user user \
    --password password \
    gen-fixtures \
        --name my_favorite_car_info \
        --description "Info for my favorite car in no specific state."
        --vehicle TMOCKAA0AA000000 \
        get info

This will call all the selected get-routes and load all data from your vehicles (no actions will be performed).

The data will be anonymized (vin and personal data are replaced) and serves as unit tests.

Please create a pull request with the resulting data to help us cover more vehicles.

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

myskoda-0.12.0.tar.gz (36.2 kB view details)

Uploaded Source

Built Distribution

myskoda-0.12.0-py3-none-any.whl (47.9 kB view details)

Uploaded Python 3

File details

Details for the file myskoda-0.12.0.tar.gz.

File metadata

  • Download URL: myskoda-0.12.0.tar.gz
  • Upload date:
  • Size: 36.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for myskoda-0.12.0.tar.gz
Algorithm Hash digest
SHA256 48cca26db1c3a4d4ad9317283da3f77d1d3598048d47e2b3b9a3b835ab6bf9ef
MD5 1fab29f3eaec9758d08df528006f1f1f
BLAKE2b-256 71dc820eeaf7d35cfcc30a49126e85d466911f51ab7fbd2948eea8b49a881de4

See more details on using hashes here.

Provenance

The following attestation bundles were made for myskoda-0.12.0.tar.gz:

Publisher: publish.yaml on skodaconnect/myskoda

Attestations:

File details

Details for the file myskoda-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: myskoda-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 47.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for myskoda-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 587580dbf8a0e7d90f6b29bc534661c94e83716339b926cebcf2f981cdbf1f0f
MD5 7699f6f03176b84e499f45d7a7250bb2
BLAKE2b-256 36c9af59b16e30ca8c7747920ba03e59018555794a4ae7a957df174f5a8afceb

See more details on using hashes here.

Provenance

The following attestation bundles were made for myskoda-0.12.0-py3-none-any.whl:

Publisher: publish.yaml on skodaconnect/myskoda

Attestations:

Supported by

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