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

Uploaded Python 3

File details

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

File metadata

  • Download URL: viaggiatreno_ha-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 dfeac6a335c8b1faa28ad1f1ad18eb171724e867ceede5eeadcb50379af631c6
MD5 2c716233a725d5204607b2a25954c11b
BLAKE2b-256 3807fc3e5d401138897b775860b0e1a29db0b7e4f23df0b7f5d92143ab841070

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for viaggiatreno_ha-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a956b485cbdac7d240a78a84dc32fb194e08b84cb35a92173e5874a6e535ebfb
MD5 9df3c6d7721236483249dabcf72da0cd
BLAKE2b-256 09e31989616f65d4ed0e3bd8a8c80b9a897fc4b053a64168224704502ba6fc2d

See more details on using hashes here.

Provenance

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