{ "info": { "author": "Myles Eftos", "author_email": "myles@madpilot.com.au", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# pyptv3 - Access the Public Transport Victoria API with Python 3\n\npyptv3 is a Python library that provides a light wrapper around version 3 of the Public Transport Victoria (PTV) API.\n\nThe PTV Timetable API provides direct access to Public Transport Victoria\u2019s public transport timetable data.\n\nThe API returns scheduled timetable, route and stop data for all metropolitan and regional train, tram and bus services in Victoria, including Night Network(Night Train and Night Tram data are included in metropolitan train and tram services data, respectively, whereas Night Bus is a separate route type).\n\nThe API also returns real-time data for metropolitan train, tram and bus services (where this data is made available to PTV), as well as disruption information, stop facility information, and access to myki ticket outlet data.\n\n## Getting Started\n\nYou will need a developer key from PTV. The instructions (in RTF format) are [here](https://static.ptv.vic.gov.au/PTV/PTV%20docs/API/1475462320/PTV-Timetable-API-key-and-signature-document.RTF), though if you can't be bothered downloading that, the TL;DR is to send an email to [APIKeyRequest@ptv.vic.gov.au](mailto:APIKeyRequest@ptv.vic.gov.au) with the following information in the subject line of the email.\n\n## Installation\n\n```bash\npip install pyptv3\n```\n\n## Example\n\nAll API endpoints require a client object to be setup first. The client object takes your developer id and api key as arguments.\n```python\nfrom pyptv3 import Client\nclient = Client(\"your developer id\", \"your api key\")\n```\n\nAs a general rule, required path parameters are passed as positional arguments, and optionals are passed as lists. See the [swagger documentation](http://timetableapi.ptv.vic.gov.au/swagger/ui/index) for more information.\n\n```python\nfrom pyptv3 import Client, Departures\nclient = Client(\"your developer id\", \"your api key\")\ndepartures = Departures(client, 0, 1341).by_route(4122, platform_numbers=[0, 1], direction_id=1, look_backwards=False, gtfs=123, date_utc=\"2018-06-28T07:00:00Z\", max_results=10, include_cancelled=True, expand=[\"stop\", \"route\"])\nprint(departures)\n```\n\n## AsyncIO Example\n\nThere is a Async IO client if you want non-blocking behaviour\n\n```python\nimport asyncio\nfrom pyptv3 import AsyncClient, Departures\n\nloop = asyncio.get_event_loop()\nclient = AsyncClient(loop, \"your developer id\", \"your api key\")\n\ndef main():\n departures = await Departures(client, 0, 1341).by_route(4122, platform_numbers=[0, 1], direction_id=1, look_backwards=False, gtfs=123, date_utc=\"2018-06-28T07:00:00Z\", max_results=10, include_cancelled=True, expand=[\"stop\", \"route\"])\n print(departures)\n\nloop.run_until_complete(main())\nloop.close()\n```\n\n# TODO\n\n* pydoc\n* Map the parsed JSON object to Python objects.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/madpilot/pyptv3", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pyptv3", "package_url": "https://pypi.org/project/pyptv3/", "platform": "", "project_url": "https://pypi.org/project/pyptv3/", "project_urls": { "Homepage": "https://github.com/madpilot/pyptv3" }, "release_url": "https://pypi.org/project/pyptv3/0.0.4/", "requires_dist": null, "requires_python": "", "summary": "Access the Public Transport Victoria API with Python 3", "version": "0.0.4" }, "last_serial": 4148746, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "481d484eb7407429665d483eaaf94cdf", "sha256": "3139f711f3522e698b708f7436be5c5c008d4ccce82649b59d677dbac42df35a" }, "downloads": -1, "filename": "pyptv3-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "481d484eb7407429665d483eaaf94cdf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8406, "upload_time": "2018-07-19T06:55:17", "url": "https://files.pythonhosted.org/packages/81/8a/c3cf02c099a9a5aadd0b21e0ea830923e122137c936c61c0d9cd44c26100/pyptv3-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "65cd91c14394060459ff9fae192e4176", "sha256": "9e2c4e2eb14f83d729f82db0ae1fad459d263ed7b908071535499715ec01a7dd" }, "downloads": -1, "filename": "pyptv3-0.0.1.tar.gz", "has_sig": false, "md5_digest": "65cd91c14394060459ff9fae192e4176", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4619, "upload_time": "2018-07-19T06:55:18", "url": "https://files.pythonhosted.org/packages/2d/eb/dcabd2c932955ac76088a5f4a8985a02c87f7da0d292f6163e90228221bc/pyptv3-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "fa4530d7a3b66765106a179a210f7794", "sha256": "28611ce70045ca2ce698290105b8873ae273f46c26a032934fb678f87c23d714" }, "downloads": -1, "filename": "pyptv3-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "fa4530d7a3b66765106a179a210f7794", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8421, "upload_time": "2018-08-03T11:48:12", "url": "https://files.pythonhosted.org/packages/7b/0c/49394d274e7730da3c5b3e56fa52f3c6687844f3d6ac596529fbc87b1ab8/pyptv3-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1b89796184573bf44fb248e086fcae6d", "sha256": "9b3eeb7a0498c88517c14c687468ba92617b9e9743a0f962a4639241dc103128" }, "downloads": -1, "filename": "pyptv3-0.0.2.tar.gz", "has_sig": false, "md5_digest": "1b89796184573bf44fb248e086fcae6d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4625, "upload_time": "2018-08-03T11:48:16", "url": "https://files.pythonhosted.org/packages/b9/bc/c43be943f6275fc24b7d1ed518ee2e007386a4c47e1bcf55605621a7c711/pyptv3-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "2859d2d5aa81fe3ebdf350c30843e5b6", "sha256": "e38b580cb464edc4c729ca34b363f862ec526590e8c000d86bcd56fef44857d6" }, "downloads": -1, "filename": "pyptv3-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "2859d2d5aa81fe3ebdf350c30843e5b6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9632, "upload_time": "2018-08-06T02:03:05", "url": "https://files.pythonhosted.org/packages/7f/06/2957ad48ef0bd04abe65354feca5cdfbb3f125127924cf5f6121bf2597ad/pyptv3-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "090b1c483d4f3fede6594f9431ed58bb", "sha256": "c03ce87950caa88cb6a7a0d464530a3857377789216b80a4a5d18700f399443b" }, "downloads": -1, "filename": "pyptv3-0.0.3.tar.gz", "has_sig": false, "md5_digest": "090b1c483d4f3fede6594f9431ed58bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5268, "upload_time": "2018-08-06T02:03:06", "url": "https://files.pythonhosted.org/packages/e2/92/39f4d1146142d3c19dcd71f6b2aaf13e84d0b6c93d3665f640c6a6d03e74/pyptv3-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "443698adfc090843a594d87559acea8b", "sha256": "e86280e08ec240bfc6330047b00e32df42db33060bb713d9db2c7efa1183498a" }, "downloads": -1, "filename": "pyptv3-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "443698adfc090843a594d87559acea8b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9677, "upload_time": "2018-08-08T12:12:29", "url": "https://files.pythonhosted.org/packages/9e/ac/0e376903dee2eeb85b3e4ae4ea764b8cc39d590ef34024d48f1f16cf3fe9/pyptv3-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f70c1051de413c548664b5301f4a877d", "sha256": "332d52fb9359cb516a851345dd7061526d5b9dcc53c3bc00c9accd83bea584e6" }, "downloads": -1, "filename": "pyptv3-0.0.4.tar.gz", "has_sig": false, "md5_digest": "f70c1051de413c548664b5301f4a877d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5284, "upload_time": "2018-08-08T12:12:31", "url": "https://files.pythonhosted.org/packages/b8/3f/481f7217a6c6e7e6e762525a66131f560df0ef9de83bf7ac70860d89f354/pyptv3-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "443698adfc090843a594d87559acea8b", "sha256": "e86280e08ec240bfc6330047b00e32df42db33060bb713d9db2c7efa1183498a" }, "downloads": -1, "filename": "pyptv3-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "443698adfc090843a594d87559acea8b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9677, "upload_time": "2018-08-08T12:12:29", "url": "https://files.pythonhosted.org/packages/9e/ac/0e376903dee2eeb85b3e4ae4ea764b8cc39d590ef34024d48f1f16cf3fe9/pyptv3-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f70c1051de413c548664b5301f4a877d", "sha256": "332d52fb9359cb516a851345dd7061526d5b9dcc53c3bc00c9accd83bea584e6" }, "downloads": -1, "filename": "pyptv3-0.0.4.tar.gz", "has_sig": false, "md5_digest": "f70c1051de413c548664b5301f4a877d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5284, "upload_time": "2018-08-08T12:12:31", "url": "https://files.pythonhosted.org/packages/b8/3f/481f7217a6c6e7e6e762525a66131f560df0ef9de83bf7ac70860d89f354/pyptv3-0.0.4.tar.gz" } ] }