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.2.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.2.0
File Size Uploaded Provenance Actions
viaggiatreno-0.2.0.tar.gz 15.5 kB With provenance Details for viaggiatreno-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 36.1 kB

Release files / viaggiatreno-0.2.0.tar.gz

Download URL viaggiatreno-0.2.0.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
0c899885787483b3b1d6978b44ab3933aca824e05f55e927694dab7e78421215
BLAKE2b-256 checksum
How to use checksums
2dc3f2a0f7d19e3cf88e41db24bc1a2aff1aebd60bb8e9d71564bf14aacc30d1
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 Oct 23, 2026.

Transparency log

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

Download URL viaggiatreno-0.2.0-py3-none-any.whl
Size 20.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ac2cc5858caae83dce87210930c0665c483d0555bb2d35c8591ca9b17b7216c
BLAKE2b-256 checksum
How to use checksums
d263d687b66b36ca4bacc37a6b65bdb40549dc482ab4816f9c469046f791f66d
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 Oct 23, 2026.

Transparency log

Security for viaggiatreno 0.2.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.2.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 Oct 23, 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