Name | pyefa JSON |
Version |
0.0.3
JSON |
| download |
home_page | None |
Summary | Python API for EFA(Elektronische Fahrplanauskunft) async requests |
upload_time | 2024-11-26 22:11:25 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | MIT License Copyright (c) 2024 Alex Jung Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
efa
vgn
gtfs
public transport
traffic
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# pyefa
[![Python package](https://github.com/alex-jung/pyefa/actions/workflows/python-package.yml/badge.svg)](https://github.com/alex-jung/pyefa/actions/workflows/python-package.yml)
[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
# Installation
# Known EFA endpoints
* [Verkehrsverbund Großraum Nürnberg](https://efa.vgn.de/vgnExt_oeffi/) (VGN)
* [Verkehrsverbund Rhein-Ruhr](https://efa.vrr.de/vrr/) (VRR)
# Features
## System info
Get API system information
``` python
info: SystemInfo = None
async with EfaClient("https://efa.vgn.de/vgnExt_oeffi/") as client:
info = await client.info()
print(info.version)
print(info.data_format)
print(info.valid_from)
print(info.valid_to)
```
Output:
```python
```
## Find stop
## Get departures
# Usage
``` python
import asyncio
from pyefa import EfaClient
from pprint import pprint
async def main():
async with EfaClient("https://efa.vgn.de/vgnExt_oeffi/") as client:
result = await asyncio.gather(
client.info(),
client.stops("Nürnberg Plärrer"),
client.departures("de:09564:704", limit=10, date="20241126 16:30"),
)
print("System Info".center(60, "-"))
pprint(result[0])
print("Plärrer stops".center(60, "-"))
pprint(result[1])
print("Plärrer departures - 26 Nov. 16:30".center(60, "-"))
pprint(result[2])
if __name__ == "__main__":
asyncio.run(main())
```
# Open points
* Implement find stop by coordinates
* Implementd xml parsing for APIs not supporting rapid JSON
# Documentation
> s. pydoc in code
Raw data
{
"_id": null,
"home_page": null,
"name": "pyefa",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "efa, vgn, gtfs, public transport, traffic",
"author": null,
"author_email": "Alex Jung <jungdevelop@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/3c/49/5f3e4274ffbfcc385b9bc541f63e4cf8e7df197deba4ca1579c18a2846f3/pyefa-0.0.3.tar.gz",
"platform": null,
"description": "# pyefa\n[![Python package](https://github.com/alex-jung/pyefa/actions/workflows/python-package.yml/badge.svg)](https://github.com/alex-jung/pyefa/actions/workflows/python-package.yml)\n[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n# Installation\n\n# Known EFA endpoints\n* [Verkehrsverbund Gro\u00dfraum N\u00fcrnberg](https://efa.vgn.de/vgnExt_oeffi/) (VGN)\n* [Verkehrsverbund Rhein-Ruhr](https://efa.vrr.de/vrr/) (VRR)\n\n# Features\n## System info\nGet API system information\n``` python\ninfo: SystemInfo = None\n\nasync with EfaClient(\"https://efa.vgn.de/vgnExt_oeffi/\") as client:\n info = await client.info()\n\nprint(info.version)\nprint(info.data_format)\nprint(info.valid_from)\nprint(info.valid_to)\n```\nOutput:\n```python\n\n```\n## Find stop\n\n## Get departures\n\n# Usage\n``` python\nimport asyncio\nfrom pyefa import EfaClient\nfrom pprint import pprint\n\nasync def main():\n async with EfaClient(\"https://efa.vgn.de/vgnExt_oeffi/\") as client:\n result = await asyncio.gather(\n client.info(),\n client.stops(\"N\u00fcrnberg Pl\u00e4rrer\"),\n client.departures(\"de:09564:704\", limit=10, date=\"20241126 16:30\"),\n )\n\n print(\"System Info\".center(60, \"-\"))\n pprint(result[0])\n\n print(\"Pl\u00e4rrer stops\".center(60, \"-\"))\n pprint(result[1])\n\n print(\"Pl\u00e4rrer departures - 26 Nov. 16:30\".center(60, \"-\"))\n pprint(result[2])\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n```\n\n# Open points\n* Implement find stop by coordinates\n* Implementd xml parsing for APIs not supporting rapid JSON\n\n# Documentation\n> s. pydoc in code\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2024 Alex Jung Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Python API for EFA(Elektronische Fahrplanauskunft) async requests",
"version": "0.0.3",
"project_urls": {
"Documentation": "https://github.com/alex-jung/pyefa",
"Homepage": "https://github.com/alex-jung/pyefa",
"Issues": "https://github.com/alex-jung/pyefa/issues",
"Repository": "https://github.com/alex-jung/pyefa"
},
"split_keywords": [
"efa",
" vgn",
" gtfs",
" public transport",
" traffic"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "35215eb0b1addc143cefadec75c1c6e544fca03f6974087899cc3ac7cd99fe09",
"md5": "fe9a59cf375848f5557ca51377adca93",
"sha256": "0105ac3d6846e48a80e0b7fe3209613c549d16a6ba0c9b8f7f86c0f5ab015987"
},
"downloads": -1,
"filename": "pyefa-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fe9a59cf375848f5557ca51377adca93",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 11751,
"upload_time": "2024-11-26T22:11:23",
"upload_time_iso_8601": "2024-11-26T22:11:23.630064Z",
"url": "https://files.pythonhosted.org/packages/35/21/5eb0b1addc143cefadec75c1c6e544fca03f6974087899cc3ac7cd99fe09/pyefa-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3c495f3e4274ffbfcc385b9bc541f63e4cf8e7df197deba4ca1579c18a2846f3",
"md5": "cec5406ea8c1d43fe8fbeb21e97254a5",
"sha256": "dd01200581278c4284174800853b5772b14a23406e0d6e99d7e7f7c9161d6b25"
},
"downloads": -1,
"filename": "pyefa-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "cec5406ea8c1d43fe8fbeb21e97254a5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 14440,
"upload_time": "2024-11-26T22:11:25",
"upload_time_iso_8601": "2024-11-26T22:11:25.369966Z",
"url": "https://files.pythonhosted.org/packages/3c/49/5f3e4274ffbfcc385b9bc541f63e4cf8e7df197deba4ca1579c18a2846f3/pyefa-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-26 22:11:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "alex-jung",
"github_project": "pyefa",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pyefa"
}