{"id":22526119,"url":"https://github.com/maxmouchet/locomotive","last_synced_at":"2025-08-03T22:30:40.392Z","repository":{"id":38408003,"uuid":"190037295","full_name":"maxmouchet/locomotive","owner":"maxmouchet","description":"Python API clients for France's railways.","archived":false,"fork":false,"pushed_at":"2022-11-15T18:01:15.000Z","size":4959,"stargazers_count":45,"open_issues_count":4,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-01T12:47:19.762Z","etag":null,"topics":["api","cli","france","python","sncf","ter","tgv","train"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxmouchet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-03T15:56:42.000Z","updated_at":"2024-08-17T07:27:24.000Z","dependencies_parsed_at":"2023-01-21T13:01:44.773Z","dependency_job_id":null,"html_url":"https://github.com/maxmouchet/locomotive","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmouchet%2Flocomotive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmouchet%2Flocomotive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmouchet%2Flocomotive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmouchet%2Flocomotive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxmouchet","download_url":"https://codeload.github.com/maxmouchet/locomotive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228567003,"owners_count":17937986,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","cli","france","python","sncf","ter","tgv","train"],"created_at":"2024-12-07T06:13:37.595Z","updated_at":"2024-12-07T06:13:38.120Z","avatar_url":"https://github.com/maxmouchet.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"/docs/_assets/logo.png\" height=\"150\"\u003e\u003cbr/\u003e\n  \u003ci\u003ePython API clients and a CLI for France's railways :sparkles:\u003c/i\u003e\u003cbr/\u003e\u003cbr/\u003e\n  \u003ca href=\"https://maxmouchet.github.io/locomotive\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/docs-master-blue.svg?style=flat\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/maxmouchet/locomotive/actions\"\u003e\n    \u003cimg src=\"https://github.com/maxmouchet/locomotive/workflows/CI/badge.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://coveralls.io/github/maxmouchet/locomotive?branch=master\"\u003e\n    \u003cimg src=\"https://coveralls.io/repos/github/maxmouchet/locomotive/badge.svg?branch=master\u0026service=github\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"/docs/_assets/screen_search.png\" width=\"800px\"\u003e\n  \u003cimg src=\"/docs/_assets/screen_live.png\" width=\"800px\"\u003e\n\u003c/p\u003e\n\n## Installation\n\n`locomotive` requires Python 3.6+ and can be installed using [pip](https://pip.pypa.io/en/stable/):\n\n```bash\npip install locomotive\n```\n\n## API Clients\n\nModule | Features | Status\n-------|----------|-------\n[oui_v3](/locomotive/api/oui_v3.py) | Travel Request | ![oui_v3](https://github.com/maxmouchet/locomotive/workflows/oui_v3/badge.svg)\n[gc](/locomotive/api/gc.py) | Board Request | ![oui_v3](https://github.com/maxmouchet/locomotive/workflows/gc/badge.svg)\n\n## CLI\n\nlocomotive is easy to use. Find below simple examples:\n\n```bash\nlocomotive search --help\n# Search by city name\nlocomotive search Amsterdam Paris\n# Search by train station code (Amsterdam to Paris here)\nlocomotive search NLAMA FRPAR\n# Specify the date and the travel class\nlocomotive search Brest Paris --date 2019/07/14 --class first\n```\n\n## Development\n\n```bash\npoetry install\npoetry run locomotive\n\n# pre-commit\npoetry run pre-commit install\npoetry run pre-commit run --all-files\n```\n\n### Releases\n\n```bash\npoetry version X.Y.Z # e.g. v0.4.0\ngit tag vX.Y.Z\ngit push --tags\n```\n\n## Licenses\n\nlocomotive is released under the [MIT license](https://github.com/maxmouchet/locomotive/blob/master/LICENSE).\nThe train stations database (`stations-lite.csv`) is derived from `stations.csv` ([trainline-eu/stations](https://github.com/trainline-eu/stations)) released under the Open Database License (ODbL) license.\n\n*Logo: Train Tickets by b farias from the Noun Project.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxmouchet%2Flocomotive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxmouchet%2Flocomotive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxmouchet%2Flocomotive/lists"}