Skip to main content

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())

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.4.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.4-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: viaggiatreno_ha-0.2.4.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.4.tar.gz
Algorithm Hash digest
SHA256 e3650f377f2d8161d33df9c9fa9cf92860565dbbbae94c1cd1733ce49d4dc6e1
MD5 a91f1585697bab2cac2f95d73a9b7c9d
BLAKE2b-256 91d5beea33f5a24a3763a6d0d91fff1eb70e3f8395111ddb57d93fca0cf7f5c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for viaggiatreno_ha-0.2.4.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.4-py3-none-any.whl.

File metadata

File hashes

Hashes for viaggiatreno_ha-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 940ba9ff2363be5ffb6bf4da2eea4add29247e6d87cb4cbfd56c1fd1ae6a8557
MD5 479adab910227933327cccf0851b8c42
BLAKE2b-256 03f7a910b4a6a63852db46e885bd79ce032ad4857f317fc2010438e133385f10

See more details on using hashes here.

Provenance

The following attestation bundles were made for viaggiatreno_ha-0.2.4-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.

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.1.8

2 files

0.1.7

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page