Name | rrta JSON |
Version |
0.1
JSON |
| download |
home_page | |
Summary | Python wrapper for the RRTA (MyStop) REST API. |
upload_time | 2023-06-17 13:29:57 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.9 |
license | |
keywords |
rrta
lancaster
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# python-rrta
Python wrapper for the RRTA (MyStop) REST API.
## Usage
```python
import aiohttp
import asyncio
from rrta import RRTAClient
async def main():
session = aiohttp.ClientSession()
client = RRTAClient(session=session)
routes = await client.get_all_routes()
for route in routes:
vehicles = await client.get_vehicles(route_ids=[route.RouteId])
print(f"Route {route.RouteId}: {len(vehicles)} Vehicles")
for v in vehicles:
print(f"\t{v.VehicleId} currently en-route to {v.Destination} at {v.Speed} MPH")
if __name__ == "__main__":
asyncio.run(main())
```
## Installation
pip install rrta
## Known Issues
* Dataclasses are not pythonic at the moment and contain a bunch of member variables that RRTA doesn't seem to use despite being part of the MyStop spec
Raw data
{
"_id": null,
"home_page": "",
"name": "rrta",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "",
"keywords": "rrta,lancaster",
"author": "",
"author_email": "Nate Shoffner <nate.shoffner@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/bb/8e/29e061b623f0255c873a61ff2cb388990f2e18cabe6d10a7f6ae79519bc0/rrta-0.1.tar.gz",
"platform": null,
"description": "# python-rrta\r\n\r\nPython wrapper for the RRTA (MyStop) REST API.\r\n\r\n## Usage\r\n\r\n```python\r\nimport aiohttp\r\nimport asyncio\r\nfrom rrta import RRTAClient\r\n\r\nasync def main():\r\n session = aiohttp.ClientSession()\r\n client = RRTAClient(session=session)\r\n\r\n routes = await client.get_all_routes()\r\n\r\n for route in routes:\r\n vehicles = await client.get_vehicles(route_ids=[route.RouteId])\r\n\r\n print(f\"Route {route.RouteId}: {len(vehicles)} Vehicles\")\r\n\r\n for v in vehicles:\r\n print(f\"\\t{v.VehicleId} currently en-route to {v.Destination} at {v.Speed} MPH\")\r\n\r\nif __name__ == \"__main__\":\r\n asyncio.run(main())\r\n\r\n```\r\n\r\n## Installation\r\n\r\n pip install rrta\r\n\r\n## Known Issues\r\n\r\n* Dataclasses are not pythonic at the moment and contain a bunch of member variables that RRTA doesn't seem to use despite being part of the MyStop spec\r\n",
"bugtrack_url": null,
"license": "",
"summary": "Python wrapper for the RRTA (MyStop) REST API.",
"version": "0.1",
"project_urls": {
"Bug Tracker": "https://github.com/NateShoffner/python-rrta/issues",
"Homepage": "https://github.com/NateShoffner/python-rrta"
},
"split_keywords": [
"rrta",
"lancaster"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ba96b858b6aff4a358d21ef67b7353ae602d95e6ddbe2195bad6ca6570183593",
"md5": "5534bc5f22eae7260bf93954c67371d0",
"sha256": "6042d4152943859b410218351b7edd157816fad58914304c89cdb68b81380a48"
},
"downloads": -1,
"filename": "rrta-0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5534bc5f22eae7260bf93954c67371d0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 10386,
"upload_time": "2023-06-17T13:29:56",
"upload_time_iso_8601": "2023-06-17T13:29:56.269782Z",
"url": "https://files.pythonhosted.org/packages/ba/96/b858b6aff4a358d21ef67b7353ae602d95e6ddbe2195bad6ca6570183593/rrta-0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bb8e29e061b623f0255c873a61ff2cb388990f2e18cabe6d10a7f6ae79519bc0",
"md5": "718d347f67adc8dea5dab428608f2cab",
"sha256": "fd5fb0d93b97b0b749fafa70781ef36e37135563ec6f18122ee81950700a2243"
},
"downloads": -1,
"filename": "rrta-0.1.tar.gz",
"has_sig": false,
"md5_digest": "718d347f67adc8dea5dab428608f2cab",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 7510,
"upload_time": "2023-06-17T13:29:57",
"upload_time_iso_8601": "2023-06-17T13:29:57.962177Z",
"url": "https://files.pythonhosted.org/packages/bb/8e/29e061b623f0255c873a61ff2cb388990f2e18cabe6d10a7f6ae79519bc0/rrta-0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-17 13:29:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "NateShoffner",
"github_project": "python-rrta",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "rrta"
}