{"id":31844772,"url":"https://github.com/jonperron/python-navitia-client","last_synced_at":"2025-11-23T10:05:19.849Z","repository":{"id":228166376,"uuid":"769249292","full_name":"jonperron/python-navitia-client","owner":"jonperron","description":"Python client to use Navitia APIs","archived":false,"fork":false,"pushed_at":"2025-08-12T10:17:05.000Z","size":255,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-22T04:49:02.347Z","etag":null,"topics":["mobility","navitia","public-transportation"],"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/jonperron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-08T16:45:08.000Z","updated_at":"2025-08-12T10:16:41.000Z","dependencies_parsed_at":"2024-05-08T18:10:59.057Z","dependency_job_id":"30413cf9-7203-4925-b2d2-d764c50334d2","html_url":"https://github.com/jonperron/python-navitia-client","commit_stats":null,"previous_names":["jonperron/navitia-client","jonperron/python-navitia-client"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/jonperron/python-navitia-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonperron%2Fpython-navitia-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonperron%2Fpython-navitia-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonperron%2Fpython-navitia-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonperron%2Fpython-navitia-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonperron","download_url":"https://codeload.github.com/jonperron/python-navitia-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonperron%2Fpython-navitia-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010677,"owners_count":26084785,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["mobility","navitia","public-transportation"],"created_at":"2025-10-12T07:48:06.616Z","updated_at":"2025-11-23T10:05:19.844Z","avatar_url":"https://github.com/jonperron.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# navitia-client\n\n[![Pre-release Build Status](https://img.shields.io/github/actions/workflow/status/jonperron/python-navitia-client/pre-release.yaml?branch=main)](https://github.com/jonperron/python-navitia-client/actions)\n[![Release Build Status](https://img.shields.io/github/actions/workflow/status/jonperron/python-navitia-client/release.yaml?branch=main)](https://github.com/jonperron/python-navitia-client/actions)\n[![Python Version](https://img.shields.io/pypi/pyversions/python-navitia-client.svg)](https://pypi.org/project/python-navitia-client/)\n\nThis repository provides a unofficial Python wrapper to use [navitia.io APIs](https://doc.navitia.io).\n\n\u003e **⚠️ Version 2.0.0 Breaking Changes**\n\u003e\n\u003e Version 2.0.0 introduces breaking changes with the adoption of Request objects for all API methods.\n\u003e If you're upgrading from v1.x, please see the [CHANGELOG](CHANGELOG.md) for the migration guide.\n\n##  Pre-requisites\n\nTo use this library, you will need an access token from [navitia.io](https://navitia.io/tarifs/).\n\n##  Installation\n\nThe package is available on PiPy\n\n```bash\npip install python-navitia-client\n```\n\n##  API support\n\nThe library supports the following [APIs](https://doc.navitia.io/#api-catalog):\n\n| API                                       | Supported ? | Comment                                      |\n| ----------------------------------------- | ----------- | -------------------------------------------- |\n| Coverage                                  | ✅           |                                              |\n| Datasets                                  | ✅           |                                              |\n| Contributors                              | ✅           |                                              |\n| Inverted geocoding                        | ✅           |                                              |\n| Public transportation Objects exploration | ✅           |                                              |\n| Autocomplete on Public Transport objects  | ✅           |                                              |\n| Autocomplete on geographical objects      | ✅           |                                              |\n| Places nearby                             | ✅           |                                              |\n| Journeys                                  | ✅           |                                              |\n| Isochrones                                | ✅           |                                              |\n| Route Schedules                           | ✅           |                                              |\n| Stop Schedules                            | ✅           |                                              |\n| Terminus Schedules                        | ✅           |                                              |\n| Departures                                | ✅           |                                              |\n| Arrivals                                  | ✅           |                                              |\n| Line reports                              | ✅           |                                              |\n| Traffic reports                           | ✅           |                                              |\n| Equipment reports                         | ✅           | Not available to all providers               |\n| Freefloating nearby                       | ✅           | Not available to all providers               |\n\n## Usage\n\nTo use this library, you need an authentication token provided by Navitia.io.\n\n### Create client instance\n\nCreate an instance of the NavitiaClient class with your authentication token:\n\n```python\nfrom navitia_client import NavitiaClient\n\nclient = NavitiaClient(auth=\"YOUR_TOKEN_HERE\")\n```\n\nA base URL for Navitia IO is hardcoded and provided to NavitiaClient by default. It can be updated using the `base_navitia_url` parameter.\n\n###  Access APIs data\n\nURLs are mapped as properties in the `NavitiaClient` class. You can find the mapping [here](docs/api_support/).\n\n#### Simple APIs (Coverage, Datasets, Contributors)\n\nFor simple APIs like coverage, datasets, and contributors, you can call methods directly:\n\n```python\n# Get coverage information\nregions = client.coverage.list_coverage_regions()\n\n# Get datasets for a region\ndatasets, pagination = client.datasets.list_datasets(region_id=\"fr-idf\")\n```\n\n#### APIs with Request Objects (Journeys, Places, Schedules, etc.)\n\nMost APIs now use Request objects for better type safety and maintainability:\n\n```python\nfrom navitia_client.entities.request.journey import JourneyRequest\nfrom datetime import datetime\n\n# Create a journey request\nrequest = JourneyRequest(\n    from_=\"stop_area:RAT:SA:GDLYO\",\n    to_=\"stop_area:RAT:SA:CHDEG\",\n    datetime_=datetime(2024, 6, 1, 8, 0),\n    count=5\n)\n\n# Get journeys\njourneys = client.journeys.list_journeys(request=request)\n```\n\nOther examples:\n\n```python\nfrom navitia_client.entities.request.places_nearby import PlacesNearbyRequest\n\n# Places nearby with custom parameters\nrequest = PlacesNearbyRequest(\n    distance=1000,\n    type=[\"stop_area\", \"stop_point\"],\n    count=20\n)\nplaces, pagination = client.places_nearby.list_objects_by_region_id_and_path(\n    region_id=\"fr-idf\",\n    resource_path=\"lines/line:RAT:M1\",\n    request=request\n)\n```\n\n### Pagination\n\nSeveral APIs are paginated, particularly the public transportation APIs. You can navigate through results using the `start_page` and `count` parameters in Request objects:\n\n```python\nfrom navitia_client.entities.request.journey import JourneyRequest\n\n# Request with pagination\nrequest = JourneyRequest(\n    from_=\"stop_area:RAT:SA:GDLYO\",\n    to_=\"stop_area:RAT:SA:CHDEG\",\n    start_page=0,  # First page\n    count=10       # 10 results per page\n)\n\njourneys = client.journeys.list_journeys(request=request)\n```\n\nA `Pagination` object is provided by paginated methods to help you navigate through results.\n\n### Tips\n\nFew tips on how to use the Navitia APIs are available [here](docs/few_tips.md).\n\n##  Dependencies\n\n* Python \u003e= 3.10\n* requests\u003e=2.31\n\nAdditional dependencies are described in the [pyproject.toml file](pyproject.toml).\n\n##  Contributing\n\nYou are free to contribute to the repo. Please read [Contributing.md](docs/CONTRIBUTING.md).\n\n##  Additional questions\n\n* Are you affiliated with Navitia ?\nNo. This is an unofficial wrapper for the Navitia.io APIs.\n\n* Is this client asynchronous ?\nNo, and it is not planned to. If you want to add async support, feel free to contribute.\n\n* Is this client production ready ?\nYes and no. For my own purpose, it is, but I cannot guarantee that everything will behave well. If you spot a bug, please open an issue in the repo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonperron%2Fpython-navitia-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonperron%2Fpython-navitia-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonperron%2Fpython-navitia-client/lists"}