{ "info": { "author": "Edward Wells", "author_email": "git@edward.sh", "bugtrack_url": null, "classifiers": [], "description": "=======\nMARTApy\n=======\nPython wrapper for MARTA realtime rail and bus APIs:\nhttp://www.itsmarta.com/app-developer-resources.aspx\n\n============\nInstallation\n============\nTo install via *pip*, just:\n\n.. code-block:: bash\n\n $ pip install martapy\n\nOr, locally from the same directory as ``setup.py``:\n\n.. code-block:: bash\n\n $ python setup.py install\n\n====\nRail\n====\nTo get a list of train arrivals:\n\n.. code-block:: python\n\n from martapy import RailClient\n\n rail_client = RailClient(api_key=\"your_api_key\")\n arrivals = rail_client.arrivals()\n\nThis returns an instance of ``martapy.rail.Arrivals(list)`` which\nhas a few handy methods to filter results further.\n\nFor example, to print the destination and waiting time for upcoming\narrivals at *Peachtree Center Station*:\n\n.. code-block:: python\n\n from martapy import RailClient\n\n rail_client = RailClient(api_key=\"your_api_key\")\n peachtree_station = rail_client.arrivals().by_station('peachtree')\n\n for arrival in peachtree_station:\n print(\"To: {}, When: {}\".format(arrival.destination, arrival.waiting_time))\n\nWith output that would look something like::\n To: Airport, When: Arriving\n To: Lindbergh, When: 16 min\n To: Doraville, When: 19 min\n\nFilters\n-------\nTo narrow results, ``martapy.rail.Arrivals(list)`` has\na number of properties/methods:\n\n- Arrivals by **line**:\n ``red_line``\n ``blue_line``\n ``green_line``\n ``gold_line``\n- Arrivals by **direction**:\n ``northbound``\n ``eastbound``\n ``westbound``\n ``southbound``\n- Arrivals by **waiting time**:\n ``boarding``\n ``arriving``\n ``arrived``\n- Arrivals grouped by **station name**:\n ``Arrivals.stations``\n- Arrivals grouped by **train ID**:\n ``Arrivals.trains``\n- Arrivals associated with a **specific station**:\n ``Arrivals.by_station('station name')``\n\nThese can be chained as well for more specific results. For example, to\nget all arrivals for the red line which are heading southbound:\n\n.. code-block:: python\n\n from martapy.rail import RailClient\n\n rail_client = RailClient(api_key=\"your_api_key\")\n arrivals = rail_client.arrivals().red_line.southbound\n\nOther properties\n----------------\nEach ``Arrivals`` instance returned is just a list of\n``martapy.rail.Arrival`` objects, with properties similar to the filters\nabove (*station, direction, event\\_time, line...*). To get the original\nJSON string back, use ``Arrival.json``.\n\n====\nBus\n====\nTo get a list of active buses:\n\n.. code-block:: python\n\n from martapy import BusClient\n\n bus_client = BusClient()\n buses = bus_client.buses()\n\nTo get active buses for a particular route number, use\n``BusClient.buses(route=111)`` (or any other route number)\n\nTo filter this list down further, use ``filter()`` on the returned ``Buses``\nlist. For example, to return only *Westbound* buses:\n\n.. code-block:: python\n\n from martapy import BusClient\n\n bus_client = BusClient()\n buses = bus_client.buses().filter(direction='Westbound')", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/arcward/fbparser", "keywords": "MARTA API rail train Atlanta Georgia GA ATL itsmarta", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "martapy", "package_url": "https://pypi.org/project/martapy/", "platform": "", "project_url": "https://pypi.org/project/martapy/", "project_urls": { "Homepage": "https://github.com/arcward/fbparser" }, "release_url": "https://pypi.org/project/martapy/1.1/", "requires_dist": null, "requires_python": "", "summary": "Wrapper for MARTA realtime rail/bus APIs", "version": "1.1" }, "last_serial": 2812489, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "9e868ae0b38880534abc87f9a89d8c66", "sha256": "4c3ce093c47d5b2f5adfe02ca439880696ddac0a1c09b5851f28cca633765979" }, "downloads": -1, "filename": "martapy-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "9e868ae0b38880534abc87f9a89d8c66", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7747, "upload_time": "2017-04-10T00:56:31", "url": "https://files.pythonhosted.org/packages/5c/90/aee55f43e82cbe5502d1ff98fb3292da147945b028519ba8507d8a7298e6/martapy-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a2f27d29990c4b3037c7967be4a11d3b", "sha256": "1997dfec2be8e8965c9f8f3445449e5d269022d7717dbd826eeb314c1f109198" }, "downloads": -1, "filename": "martapy-1.0.1.tar.gz", "has_sig": false, "md5_digest": "a2f27d29990c4b3037c7967be4a11d3b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5794, "upload_time": "2017-04-10T00:46:21", "url": "https://files.pythonhosted.org/packages/2f/92/5eaa6ae46da1c1bb80c9f4d2fa10a6c3aac175bcf38859d4e433528ee9fa/martapy-1.0.1.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "dd6cdc0cf91d920670936f1c3ef29521", "sha256": "49dbcedc1d3048f4f75171095bee254d86e43382c3c33e0e1d00325e0ceaaade" }, "downloads": -1, "filename": "martapy-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "dd6cdc0cf91d920670936f1c3ef29521", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9758, "upload_time": "2017-04-18T23:19:25", "url": "https://files.pythonhosted.org/packages/cf/5a/93571a8ce20679234f76f7a44dd74801f4642b75015cc0b194418c7dcb42/martapy-1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "da241091e03b7973e874c5da71e89421", "sha256": "496fc4370e63a201f7052aa8c258d5a83ac883b5f11c45c37245fe1d7491c389" }, "downloads": -1, "filename": "martapy-1.1.tar.gz", "has_sig": false, "md5_digest": "da241091e03b7973e874c5da71e89421", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7351, "upload_time": "2017-04-18T23:18:59", "url": "https://files.pythonhosted.org/packages/d7/51/25519b42766556bee53ad110dbf9e22bfde15c5e3875487ab54eac18db0d/martapy-1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dd6cdc0cf91d920670936f1c3ef29521", "sha256": "49dbcedc1d3048f4f75171095bee254d86e43382c3c33e0e1d00325e0ceaaade" }, "downloads": -1, "filename": "martapy-1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "dd6cdc0cf91d920670936f1c3ef29521", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9758, "upload_time": "2017-04-18T23:19:25", "url": "https://files.pythonhosted.org/packages/cf/5a/93571a8ce20679234f76f7a44dd74801f4642b75015cc0b194418c7dcb42/martapy-1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "da241091e03b7973e874c5da71e89421", "sha256": "496fc4370e63a201f7052aa8c258d5a83ac883b5f11c45c37245fe1d7491c389" }, "downloads": -1, "filename": "martapy-1.1.tar.gz", "has_sig": false, "md5_digest": "da241091e03b7973e874c5da71e89421", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7351, "upload_time": "2017-04-18T23:18:59", "url": "https://files.pythonhosted.org/packages/d7/51/25519b42766556bee53ad110dbf9e22bfde15c5e3875487ab54eac18db0d/martapy-1.1.tar.gz" } ] }