Skip to main content

viaggiatreno

Client Python per le API non ufficiali di ViaggiaTreno, il sistema informativo in tempo reale della rete ferroviaria italiana.

La libreria fornisce:

  • ViaggiaTrenoClient — client HTTP asincrono (basato su httpx) per tutti gli endpoint REST di ViaggiaTreno (stazioni, partenze/arrivi, andamento treni, tratte, infomobilità, meteo, statistiche).
  • Modelli dati tipizzati (pydantic): StationDetail, TrainBoardItem, TrainStatus, DettaglioTratta, Statistics, e altri.
  • Parser per le risposte non-JSON (RSS infomobilità, autocomplete testuali).

Installazione

pip install viaggiatreno

Esempio

import asyncio
from viaggiatreno import ViaggiaTrenoClient


async def main() -> None:
    async with ViaggiaTrenoClient() as client:
        stazioni = await client.autocompleta_stazione("Milano")
        for s in stazioni:
            print(s)


asyncio.run(main())

Licenza

Vedi il file LICENSE nel repository.

Repository: https://github.com/matteoredaelli/pyviaggiatreno

Metadata

Release files for viaggiatreno 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for viaggiatreno 0.3.0
File Size Uploaded Provenance Actions
viaggiatreno-0.3.0.tar.gz 27.9 kB With provenance Details for viaggiatreno-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for viaggiatreno 0.3.0
File Interpreter ABI Platform Actions
viaggiatreno-0.3.0-py3-none-any.whl Python 3 none any Details for viaggiatreno-0.3.0-py3-none-any.whl

Total release size: 61.6 kB

Release files / viaggiatreno-0.3.0.tar.gz

Download URL viaggiatreno-0.3.0.tar.gz
Size 27.9 kB
Tags Source
SHA-256 checksum
How to use checksums
11181804d5c787bf93f25d8d84fd46f8f8b8f321ee5683b5a85d99ecb8a76fa4
BLAKE2b-256 checksum
How to use checksums
82ae84ba00c2db58d6d8119318824d8471737c25511daefcb3d148f018934679
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / viaggiatreno-0.3.0-py3-none-any.whl

Download URL viaggiatreno-0.3.0-py3-none-any.whl
Size 33.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c18f9f76465f6a7d0fc8b784d4e71722a5f23a64440c46e1bc2d5e0dc93f16a
BLAKE2b-256 checksum
How to use checksums
13c9e39b26a7463874067b7bd6d420a22bdd95bca4e1c37754e3b0d91f67022d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Security for viaggiatreno 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for viaggiatreno-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page