Skip to content
This repository was archived by the owner on Feb 26, 2026. It is now read-only.

maxmouchet/locomotive

Repository files navigation


Python API clients and a CLI for France's railways ✨

Installation

Warning

As of February 26th 2026 the locomotive package on PyPI has been transferred to dariaa for reuse on another project.

API Clients

Module Features Status
oui_v3 Travel Request oui_v3
gc Board Request oui_v3

CLI

locomotive is easy to use. Find below simple examples:

locomotive search --help
# Search by city name
locomotive search Amsterdam Paris
# Search by train station code (Amsterdam to Paris here)
locomotive search NLAMA FRPAR
# Specify the date and the travel class
locomotive search Brest Paris --date 2019/07/14 --class first

Development

poetry install
poetry run locomotive

# pre-commit
poetry run pre-commit install
poetry run pre-commit run --all-files

Releases

poetry version X.Y.Z # e.g. v0.4.0
git tag vX.Y.Z
git push --tags

Licenses

locomotive is released under the MIT license. The train stations database (stations-lite.csv) is derived from stations.csv (trainline-eu/stations) released under the Open Database License (ODbL) license.

Logo: Train Tickets by b farias from the Noun Project.

About

Python API clients for France's railways.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages