{"id":23143099,"url":"https://github.com/alex-jung/apyefa","last_synced_at":"2025-08-17T14:33:05.371Z","repository":{"id":265447179,"uuid":"896014461","full_name":"alex-jung/apyefa","owner":"alex-jung","description":"Python API for EFA(Elektronische Fahrplanauskunft) async requests","archived":false,"fork":false,"pushed_at":"2025-06-24T19:37:13.000Z","size":106,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-25T05:59:10.097Z","etag":null,"topics":["api","async","efa","fahrplanauskunft","python","requests"],"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/alex-jung.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-29T11:23:59.000Z","updated_at":"2025-06-24T19:36:00.000Z","dependencies_parsed_at":"2024-12-24T22:21:39.096Z","dependency_job_id":"5f5c66a9-501d-40dd-bf3d-84b6b9d1901f","html_url":"https://github.com/alex-jung/apyefa","commit_stats":null,"previous_names":["alex-jung/apyefa"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/alex-jung/apyefa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-jung%2Fapyefa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-jung%2Fapyefa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-jung%2Fapyefa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-jung%2Fapyefa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alex-jung","download_url":"https://codeload.github.com/alex-jung/apyefa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alex-jung%2Fapyefa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270859304,"owners_count":24658181,"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-08-17T02:00:09.016Z","response_time":129,"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":["api","async","efa","fahrplanauskunft","python","requests"],"created_at":"2024-12-17T15:12:09.854Z","updated_at":"2025-08-17T14:33:05.334Z","avatar_url":"https://github.com/alex-jung.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apyefa\n[![Python package](https://github.com/alex-jung/apyefa/actions/workflows/python-package.yml/badge.svg)](https://github.com/alex-jung/apyefa/actions/workflows/python-package.yml)\n[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n# Intro\n**apyefa** is a python package used to asynchronously fetch public transit routing data via EFA  interfaces like [efa.vgn](https://efa.vgn.de/vgnExt_oeffi/\"). It can request itineraries for Bus/Trams/Subways etc. connections and return data in a human and machine readable format.\n\n# Installation\nYou only need to install the **apyefa** package, for example using pip:\n``` bash\npip install apyefa\n```\n\n# Restrictions\nCurrently the package supports only endpoints using [RapidJSON](https://rapidjson.org/) format. To check whether the endpoint supports this format, please call:\n``` bash\ncurl \u003cEFA API URL\u003e/XML_SYSTEMINFO_REQUEST?outputFormat=rapidJSON\ne.g. curl https://bahnland-bayern.de/efa/XML_SYSTEMINFO_REQUEST?outputFormat=rapidJSON\n```\nIf API's answer looks like this, endpoint supports rapidJSON:\n```\n{\"version\":\"10.6.21.17\",\"ptKernel\":{\"appVersion\":\"10.6.22.28 build 16.12.2024 11:14:57\",\"dataFormat\":\"EFA10_06_01\",\"dataBuild\":\"2024-12-31T00:54:55Z\"},\"validity\":{\"from\":\"2024-12-15\",\"to\":\"2025-06-14\"}}\n```\n\n# Development setup\nCreate and activate virtual environment. Then install dependencies required by `apefa` package.\n``` bash\npython3 -m venv .venv\nsource .venv/bin/activate\npip install .\n```\n\n# apyefa functions\n|Function Name                                                |Description|\n|----------------------------------------------------|-----------|\n|[info()](https://github.com/alex-jung/apyefa/wiki/info)|Provides EFA endpoint system information|\n|[locations_by_name()](https://github.com/alex-jung/apyefa/wiki/locations_by_name)|Search for locations by name with optional filters|\n|[locations_by_coord()](https://github.com/alex-jung/apyefa/wiki/locations_by_coord)|Search for locations by coordinates|\n|[list_lines()](https://github.com/alex-jung/apyefa/wiki/list_lines)|Retrieves a list of lines|\n|[list_stops()](https://github.com/alex-jung/apyefa/wiki/list_stops)|Retrieves a list of stops|\n|[trip()](https://github.com/alex-jung/apyefa/wiki/trip)|Calculates a trip between an origin and a destination locations|\n|[departures_by_location()](https://github.com/alex-jung/apyefa/wiki/departures_by_location)|Fetches departures for a given location|\n|[lines_by_name()](https://github.com/alex-jung/apyefa/wiki/lines_by_name)|Fetches lines by name|\n|[lines_by_location()](https://github.com/alex-jung/apyefa/wiki/lines_by_location)|Fetches lines for a specific location|\n|[line_stops()](https://github.com/alex-jung/apyefa/wiki/line_stops)|Retrieves the stops for a given line|\n|[coord_bounding_box()](https://github.com/alex-jung/apyefa/wiki/coord_bounding_box)|Requests locations within a bounding box|\n|[coord_radial()](https://github.com/alex-jung/apyefa/wiki/coord_radial)|Requests locations within a radius|\n|[geo_object()](https://github.com/alex-jung/apyefa/wiki/geo_object)|Generates a sequence of coordinates and all passed stops of a provided line|\n\n\n# Example\n``` python\nimport asyncio\nfrom apyefa import EfaClient\nfrom apyefa.data_classes import (\n    Location,\n    LocationFilter,\n)\n\nasync def async_info(client: EfaClient):\n    info = await client.info()\n    print(info)\n\nasync def async_location_by_name(client: EfaClient):\n    stops: list[Location] = await client.locations_by_name(\n        \"Plärrer\", filters=[LocationFilter.STOPS], limit=20\n    )\n    for s in stops:\n        print(s)    \n\nasync def main():\n    async with EfaClient(\"https://bahnland-bayern.de/efa/\") as client:\n        await asyncio.gather(\n            async_info(client),\n            async_location_by_name(client),\n        )\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex-jung%2Fapyefa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falex-jung%2Fapyefa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falex-jung%2Fapyefa/lists"}