Skip to main content

Viaggiatreno API wrapper to use with Home Assistant.

Project description

This package is designed to query the Trenitalia ViaggiaTreno API (that are mostly undocumented, but see here, in Italian) in a Home Assistant integration.

from viaggiatreno_ha.trainline import (Viaggiatreno,
                                       TrainLine,
                                       TrainLineStatus)
from aiohttp import ClientSession

async def main():
    """Example of use."""
    async with ClientSession() as session:
        vt = Viaggiatreno(session)
        tl = TrainLine('S01765', '136')
        await vt.query_if_useful(tl)
        print(vt.get_line_status(tl))

if __name__ == "__main__":
    import asyncio
    asyncio.run(main())

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

viaggiatreno_ha-0.2.3.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

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

viaggiatreno_ha-0.2.3-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

Details for the file viaggiatreno_ha-0.2.3.tar.gz.

File metadata

  • Download URL: viaggiatreno_ha-0.2.3.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for viaggiatreno_ha-0.2.3.tar.gz
Algorithm Hash digest
SHA256 37881f03b58251e58bafc2484ec32d6df47ad56722303dfcdcd9370c8da5cbf5
MD5 aa8a3b6e6fd393f125117607b78c623f
BLAKE2b-256 740d4a340cd2354168bd83b9138d18be3763d214e094e51b336aac483aa36b55

See more details on using hashes here.

Provenance

The following attestation bundles were made for viaggiatreno_ha-0.2.3.tar.gz:

Publisher: python-publish.yml on monga/viaggiatreno_ha

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

File details

Details for the file viaggiatreno_ha-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for viaggiatreno_ha-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ab1e8e254023020418a037c48236187561dd9009d574dc0c581f60aed2948149
MD5 b08d11ff4154da6504a396cafb29b98c
BLAKE2b-256 9f1769d5e335d30429ebd973c0c349e7dd8b0d2549d5ff006f81864e97899d35

See more details on using hashes here.

Provenance

The following attestation bundles were made for viaggiatreno_ha-0.2.3-py3-none-any.whl:

Publisher: python-publish.yml on monga/viaggiatreno_ha

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