{ "info": { "author": "Ian Shiland, John Krauss", "author_email": "ishiland@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development" ], "description": "# Python-Geoclient\nCall the RESTful [NYC Geoclient API](http://developer.cityofnewyork.us/api/geoclient-api-beta) using python.\n\n [![Python 2.7 | 3.4+](https://img.shields.io/badge/python-2.7%20%7C%203.4+-blue.svg)](https://www.python.org/downloads/release/python-360/) [![Build Status](https://travis-ci.org/ishiland/nyc-geoclient.svg?branch=master)](https://travis-ci.org/ishiland/python-geoclient) [![PyPI version](https://img.shields.io/pypi/v/python-geoclient.svg)](https://pypi.python.org/pypi/python-geoclient/)\n\n### Introduction\n\nThis library provides a Python interface for using the [NYC Geoclient API](http://developer.cityofnewyork.us/api/geoclient-api-beta). It is an updated and maintained fork of [nyc_geoclient](https://github.com/talos/nyc-geoclient).\n\nIn order to use the library, you must first register an application with the [NYC Developer Portal](https://developer.cityofnewyork.us/) to obtain an application key and ID.\n\n\n### Installing\nyou can install python-geoclient using:\n\n`$ pip install python-geoclient`\n\nor you can clone this directory and:\n\n`$ python setup.py install`\n\n### Quickstart\nOnce your app has been registered with [DoITT](http://www.nyc.gov/html/doitt/html/home/home.shtml), using the API is simple:\n\n```python\nfrom geoclient import Geoclient\ng = Geoclient('my app ID', 'my app key')\n```\n\n\nYou can use any of the available methods documented in the [API](https://python-geoclient.readthedocs.io/en/latest/API.html):\n```python\ng.address(100, 'Gold st', 'MN')\n\n{u'uspsPreferredCityName': u'NEW YORK',\n u'fireCompanyType': u'E',\n u'fromLionNodeId': u'0015445',\n u'cooperativeIdNumber': u'0000',\n u'dotStreetLightContractorArea': u'1',\n u'lionBoroughCodeForVanityAddress': u'1',\n u'zipCode': u'10038',\n u'fireCompanyNumber': u'006',\n u'communityDistrict': u'101',\n u'firstStreetNameNormalized': u'GOLD STREET',\n u'boroughCode1In': u'1',\n u'latitude': 40.71035225065372,\n u'longitude': -74.00400739046181,\n ...\n }\n```\n\n### Geocoding Errors\n\npython-geoclient will raise a `GeoclientError` when the Geoclient API returns an error code. Sometimes there is more information returned, in which case the exception will have a `result` dictionary.\n\n```python\nfrom geoclient import GeoclientError\ntry:\n g.address(125, 'wort st', 1)\nexcept GeoclientError as e:\n print(e) # 'WORT STREET' NOT RECOGNIZED. THERE ARE 010 SIMILAR NAMES.\n print(e.result['streetName1']) # WORTH SQUARE\n```\n\n### Documentation\n\nThe [Python Geoclient documentation][] details using the library.\n\nThe API closely follows the [DoITT documentation][] (requires account/login).\n\n [Python Geoclient documentation]: https://python-geoclient.readthedocs.org/\n [DoITT documentation]: http://developer.cityofnewyork.us/api/geoclient-api-beta\n\n### Running Tests\n\n`python setup.py test`\n\n### Contributing\n\nIf you see an issue or would like to contribute, pull requests are welcome.\n\n### License\n\nBSD.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/ishiland/python-geoclient", "keywords": "NYC,geocoder,python-geoclient,geoclient", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "python-geoclient", "package_url": "https://pypi.org/project/python-geoclient/", "platform": "", "project_url": "https://pypi.org/project/python-geoclient/", "project_urls": { "Homepage": "http://github.com/ishiland/python-geoclient" }, "release_url": "https://pypi.org/project/python-geoclient/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "Python wrapper for the NYC Geoclient RESTful API", "version": "0.1.1" }, "last_serial": 4741065, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "7528337490cc47036c12627bd042123c", "sha256": "1eddd4f2a28bb7d5b24fb9f5902adf4dda0d308b721558d4c5fda63d6398a145" }, "downloads": -1, "filename": "python-geoclient-0.1.0.tar.gz", "has_sig": false, "md5_digest": "7528337490cc47036c12627bd042123c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6922, "upload_time": "2019-01-24T16:34:48", "url": "https://files.pythonhosted.org/packages/cb/38/8f23789d7d789dbeb5167014ae6a6089dfee2fa45c51b55d6d16108af6f9/python-geoclient-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "b15a50e59f6ade3c3eb1c648b47c5417", "sha256": "ed3d8e462e9e269b4659433efc429b3033da9f951f3c31c5ec53cfda1352c85a" }, "downloads": -1, "filename": "python-geoclient-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b15a50e59f6ade3c3eb1c648b47c5417", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7167, "upload_time": "2019-01-25T17:31:37", "url": "https://files.pythonhosted.org/packages/d6/87/5feabe8b166b610cc9e09b2f777070dc03378472e1d701dd81e80cda266f/python-geoclient-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b15a50e59f6ade3c3eb1c648b47c5417", "sha256": "ed3d8e462e9e269b4659433efc429b3033da9f951f3c31c5ec53cfda1352c85a" }, "downloads": -1, "filename": "python-geoclient-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b15a50e59f6ade3c3eb1c648b47c5417", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7167, "upload_time": "2019-01-25T17:31:37", "url": "https://files.pythonhosted.org/packages/d6/87/5feabe8b166b610cc9e09b2f777070dc03378472e1d701dd81e80cda266f/python-geoclient-0.1.1.tar.gz" } ] }