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 suhttpx) 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.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| viaggiatreno-0.1.2.tar.gz | 11.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| viaggiatreno-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.1 kB
Release files / viaggiatreno-0.1.2.tar.gz
| Download URL | viaggiatreno-0.1.2.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
087fa4a727a559c6d573cb8d1b0f65ac4215637d33608c7c41b5060469d0fbaf
|
|
BLAKE2b-256 checksum How to use checksums |
0bcd2159857ba3cd05873452e0117a96b00b423d006f2d8a60e4fb66d3a28b58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 18, 2026.
Transparency logRelease files / viaggiatreno-0.1.2-py3-none-any.whl
| Download URL | viaggiatreno-0.1.2-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
75580f7fdfc85a98784b295ea3f2d94eeb4034906e3db40e0bcaa7ab79222eed
|
|
BLAKE2b-256 checksum How to use checksums |
971b1eae09c3f90f2ea14c71aef4424ba29bfb3a55b345bf10068619001d227c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 18, 2026.
Transparency log