{ "info": { "author": "Robert Clarke", "author_email": "rob@redanorak.co.uk", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "=============\nnre-darwin-py\n=============\n\n.. image:: https://travis-ci.org/robert-b-clarke/nre-darwin-py.svg?branch=master\n :target: https://travis-ci.org/robert-b-clarke/nre-darwin-py\n\n.. image:: https://pypip.in/v/nre-darwin-py/badge.png\n :target: https://pypi.python.org/pypi//nre-darwin-py/\n :alt: Downloads\n\n\nIntroduction\n------------\n\n`nre-darwin-py` provides an abstraction layer for accessing National Rail Enquiries Darwin service via their LDB SOAP web service. This service provides live departure board information for all United Kingdom train stations.\n\nThis module has the following goals:\n\n* Allow developers to avoid the complexity of SOAP and the decisions involved in choosing a Python SOAP client\n* Provide a more pythonic interface to station board and service details information\n* Make useful documentation available through pydoc or through the `help` command in the python shell\n* Facilitate the easy creation of departure board websites and webservices\n\nGetting started\n---------------\n\nYou will need to register for Darwin access, you can do this via National Rail Enquiries `developer site `_.\n\nThen install nre-darwin-py::\n\n pip install nre-darwin-py\n\n\nBasic usage\n-----------\n\nInitiate a session::\n\n >>> from nredarwin.webservice import DarwinLdbSession\n >>> darwin_sesh = DarwinLdbSession(wsdl=\"https://lite.realtime.nationalrail.co.uk/OpenLDBWS/wsdl.aspx\", api_key=\"YOUR_KEY\")\n\nRetrieve the departure board for Manchester Piccadilly station::\n\n >>> board = darwin_sesh.get_station_board('MAN')\n >>> board.location_name\n 'Manchester Piccadilly'\n >> board.train_services[0].destination_text\n 'Rose Hill Marple'\n\nRetrieve more detailed information regarding a particular service::\n\n >>> service_id = board.train_services[0].service_id\n >>> service = darwin_sesh.get_service_details(service_id)\n >>> [cp.location_name for cp in service.subsequent_calling_points]\n [Gorton, Fairfield, Guide Bridge, Hyde Central, Woodley, Romiley, Rose Hill Marple]\n\nThe provided example.py script shows a simple departure board implementation for your reference\n\nPracticalities\n--------------\n\n* The environment variables `DARWIN_WEBSERVICE_WSDL` and `DARWIN_WEBSERVICE_API_KEY` can be used to set the WSDL url and api key, so you don't have to specify them when initiating a `DarwinLdbSession`.\n* The WSDL url for the LDB Webservice may change from time to time, and has in the past. Your application should take this into account.\n* Any call to get_station_board or get_service_details will result in a query to the LDB Webservice, and therefore an HTTP request to an external service. Your application will need to handle caching and failure modes itself.\n* There is an overhead involved when creating a `DarwinLdbSession`, as the WSDL must be retrieved and parsed.\n\nCredits\n-------\n\nAdditional contributions by George Goldberg. Advice on SUDS proxy issues from Pete Barking. \n\nTODO\n----\n\n* Make departure and arrival times available as timezone-aware datetime objects\n* More detailed exception handling\n* More examples", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/robert-b-clarke/nre-darwin-py", "keywords": null, "license": "BSD License", "maintainer": null, "maintainer_email": null, "name": "nre-darwin-py", "package_url": "https://pypi.org/project/nre-darwin-py/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/nre-darwin-py/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/robert-b-clarke/nre-darwin-py" }, "release_url": "https://pypi.org/project/nre-darwin-py/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "A simple python wrapper around National Rail Enquires LDBS SOAP Webservice", "version": "0.2.0" }, "last_serial": 1943050, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f2a89a79bf993a17af6ebe694ace0de1", "sha256": "e0475217b64247fb0c532f119da8f0e1dc2d8312d9f3719c4f9c12a26f0ce272" }, "downloads": -1, "filename": "nre-darwin-py-0.1.0.tar.gz", "has_sig": false, "md5_digest": "f2a89a79bf993a17af6ebe694ace0de1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6304, "upload_time": "2015-02-09T16:24:02", "url": "https://files.pythonhosted.org/packages/7a/57/20b04acb90d95d8784d3aa8029ad665d1c8aa7404023396cdf3733f8f1f8/nre-darwin-py-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "7ddb6a58bfcc58ac689f333107c9b996", "sha256": "df010cb2962566b0165964bf8557d7024867aa110e23530dd973e8358db0c0b3" }, "downloads": -1, "filename": "nre-darwin-py-0.1.1.tar.gz", "has_sig": false, "md5_digest": "7ddb6a58bfcc58ac689f333107c9b996", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6484, "upload_time": "2015-02-09T18:05:09", "url": "https://files.pythonhosted.org/packages/7d/83/e08e5fb5fca7d4a2cd1b2f6b87d4402c7a5762c36ba73403e15014dc8f63/nre-darwin-py-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "c1cd182af0b54435f792c90d83fc6f8a", "sha256": "aecf28f1feabfe093bcee01c1052d8de7d2438db211910598f7eb0667adc8547" }, "downloads": -1, "filename": "nre-darwin-py-0.1.2.tar.gz", "has_sig": false, "md5_digest": "c1cd182af0b54435f792c90d83fc6f8a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6625, "upload_time": "2015-03-19T20:58:08", "url": "https://files.pythonhosted.org/packages/24/50/bfee3c8ce2a3b43a840d1df228f106fef9115ffca4324046fb470f375045/nre-darwin-py-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "33dca0ff4babf4b1567474b7bdccef76", "sha256": "ea316a36aed977684ba7a6dd8fb177465419c092d05bb8b2d131cdac475c6d4a" }, "downloads": -1, "filename": "nre-darwin-py-0.1.3.tar.gz", "has_sig": false, "md5_digest": "33dca0ff4babf4b1567474b7bdccef76", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7156, "upload_time": "2015-03-28T13:02:52", "url": "https://files.pythonhosted.org/packages/16/76/5319f3ebd72010f2e3dabd9708ebeb3ca286ae524f44855e0d9f5edc3946/nre-darwin-py-0.1.3.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "7227e64e7e2d903550883f3c5051f0a8", "sha256": "1de156a2292ea5342709cddbfccab3e42bff1d12aa89a61dc23aacc4e2296d92" }, "downloads": -1, "filename": "nre-darwin-py-0.2.0.tar.gz", "has_sig": false, "md5_digest": "7227e64e7e2d903550883f3c5051f0a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7570, "upload_time": "2016-02-06T14:08:03", "url": "https://files.pythonhosted.org/packages/a7/7e/da325afa92b465f855dd326ee5dc578f14cd080e50654d45658d4f5212b8/nre-darwin-py-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7227e64e7e2d903550883f3c5051f0a8", "sha256": "1de156a2292ea5342709cddbfccab3e42bff1d12aa89a61dc23aacc4e2296d92" }, "downloads": -1, "filename": "nre-darwin-py-0.2.0.tar.gz", "has_sig": false, "md5_digest": "7227e64e7e2d903550883f3c5051f0a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7570, "upload_time": "2016-02-06T14:08:03", "url": "https://files.pythonhosted.org/packages/a7/7e/da325afa92b465f855dd326ee5dc578f14cd080e50654d45658d4f5212b8/nre-darwin-py-0.2.0.tar.gz" } ] }