Skip to main content

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

Project description


Python API clients and a CLI for France's railways :sparkles:

Installation

locomotive requires Python 3.6+ and can be installed using pip:

pip install locomotive

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.

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

locomotive-0.9.3.tar.gz (1.3 MB view hashes)

Uploaded Source

Built Distribution

locomotive-0.9.3-py3-none-any.whl (1.3 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page