{ "info": { "author": "Rohit Deshmukh", "author_email": "raigad1630@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# postcodes_io_api\nA library that provides a Python interface to the postcodes_io API.\n\n# Project URLs\n * Project Home : https://postcodes.io \n * Project Doc : https://postcodes.io/docs\n\n# Example\n```\n import postcodes_io_api\n api = postcodes_io_api.Api(debug_http=True)\n data = api.get_postcode('SW112EF')\n```\n\n# Api\n```python\nApi(self, debug_http=False, timeout=None, base_url=None)\n```\n\n## is_postcode_valid\n```python\nApi.is_postcode_valid(self, postcode)\n```\n\nThis method validates post_code\n* **:param postcode** - postcode to check i.e. 'SW112EF'\n* **:return** - True if postcode is valid False if postcode is invalid\n\n```\n is_valid = api.is_postcode_valid('SW112EF')\n\n```\n\n## is_postcode_terminated\n```python\nApi.is_postcode_terminated(self, postcode)\n```\n\n* **:param postcode** - postcode to check i.e. 'SW112ZW'\n* **:return** True if postcode is terminated or False otherwise\n\n```\n is_terminated = api.is_postcode_terminated('SW112EF')\n\n```\n\n## get_postcode\n```python\nApi.get_postcode(self, postcode)\n```\n\nThis method returns data for post_code\n* **:param postcode** - postcode to check i.e. 'SW112EF'\n* **::return** - postcode detailed data\n```\n data = api.get_postcode('SW112EF')\n\n```\n\n## get_nearest_postcodes_for_postcode\n```python\nApi.get_nearest_postcodes_for_postcode(self, **kwargs)\n```\n\n* **kwargs**\n* **:param postcode** - postcode\n* **:param limit** - (not required) Limits number of postcodes matches to return. Defaults to 10. Needs to be less than 100.\n* **:param radius** - (not required) Limits number of postcodes matches to return. Defaults to 100m. Needs to be less than 2,000m.\n* **:return:** - list of nearest postcodes data\n\n```\n data = api.get_nearest_postcodes_for_postcode(postcode='SW112EF',limit=2)\n\n```\n\n## get_nearest_postcodes_for_coordinates\n```python\nApi.get_nearest_postcodes_for_coordinates(self, **kwargs)\n```\n\n* **kwargs**\n* **:param latitude** - (required) Latitude\n* **:param longitude** - (required) Longitude\n* **:param limit** - (not required) Limits number of postcodes matches to return. Defaults to 10. Needs to be less than 100.\n* **:param radius** - (not required) Limits number of postcodes matches to return. Defaults to 100m. Needs to be less\n* **:return:** - list of nearest postcodes data\n\n```\n data = api.get_nearest_postcodes_for_coordinates(latitude=51.466324,longitude=-0.173606,limit=2)\n\n```\n\n\n## get_bulk_postcodes\n```python\nApi.get_bulk_postcodes(self, postcodes_list)\n```\n\n* **:param postcodes_list** - list containing postcodes\n* **:return** - list of postcode data\n\n```\n postcode_list = [\"SW112EF\",\"HA97QP\"]\n data = api.get_bulk_postcodes(postcode_list)\n\n```\n\n## get_bulk_reverse_geocode\n```python\nApi.get_bulk_reverse_geocode(self, payload_data)\n```\n\n* **:param payload_data** - dict with cordinates e.g.\n```\npayload_data = {\n\"geolocations\":\n[\n {\n \"longitude\": 0.629834723775309,\n \"latitude\": 51.7923246977375\n },\n {\n \"longitude\": -2.49690382054704,\n \"latitude\": 53.5351312861402,\n \"radius\": 1000,\n \"limit\": 5\n }\n]\n}\n```\n* **:return** - list of postcode data\n\n```\n data = api.get_bulk_reverse_geocode(payload_data)\n```\n\n\n## get_random_postcode\n```python\nApi.get_random_postcode(self)\n```\n\n* **:return** - random postcode\n\n```\n data = api.get_random_postcode()\n```\n\n## get_autocomplete_postcode\n```python\nApi.get_autocomplete_postcode(self, **kwargs)\n```\n\n* **kwargs**\n* **:param postcode** - partial postcode\n* **:param limit** - (not required) Limits number of postcodes matches to return. Defaults to 10. Needs to be less than 100.\n* **:return** - list of possible postcodes\n\n```\n data = api.get_autocomplete_postcode(postcode='SW18',limit=2)\n```\n\n## get_outcode\n```python\nApi.get_outcode(self, outcode)\n```\n\nThis method returns data for post_code\n* **:param outcode** - postcode outward code to check i.e. 'KT1'\n* **:return** - postcode detailed data\n\n```\n data = api.get_outcode('KT1')\n```\n\n## get_nearest_outcodes_for_outcode\n```python\nApi.get_nearest_outcodes_for_outcode(self, **kwargs)\n```\n\n* **kwargs**\n* **:param outcode** - outward code\n* **:param limit** - (not required) Limits number of postcodes matches to return. Defaults to 10. Needs to be less than 100.\n* **:param radius** - (not required) Limits number of postcodes matches to return. Defaults to 100m. Needs to be less than 2,000m.\n* **:return:** - list of nearest postcodes data\n\n```\n data = api.get_nearest_outcodes_for_outcode(outcode='KT1',limit=2)\n```\n\n## get_nearest_outcodes_for_coordinates\n```python\nApi.get_nearest_outcodes_for_coordinates(self, **kwargs)\n```\n\n* **kwargs**\n* **:param latitude** - (required) Latitude\n* **:param longitude** - (required) Longitude\n* **:param limit** - (not required) Limits number of postcodes matches to return. Defaults to 10. Needs to be less than 100.\n* **:param radius** - (not required) Limits number of postcodes matches to return. Defaults to 100m. Needs to be less\n* **:return:** - list of nearest outcodes data\n\n```\n data = api.get_nearest_outcodes_for_coordinates(latitude=51.466324,longitude=-0.173606,limit=2)\n```\n\n# Changelog - postcodes_io_api\nA library that provides a Python interface to the postcodes_io API.\n\n# 0.0.4 (12-01-2019)\n * fixed packaging issues for python 2\n\n# 0.0.3 (12-01-2019)\n * added suport for python 2\n\n# 0.0.2 (07-01-2019)\n * fixed requirements and setup file\n\n# 0.0.1 (07-01-2019)\n * initial release\n\n\n\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/raigad/python-postcodes-io", "keywords": "uk,postcode,geocode,coordinates,latitude,longitude,postcodes-api,royalmail", "license": "MIT", "maintainer": "Rohit Deshmukh", "maintainer_email": "raigad1630@gmail.com", "name": "postcodes-io-api", "package_url": "https://pypi.org/project/postcodes-io-api/", "platform": "", "project_url": "https://pypi.org/project/postcodes-io-api/", "project_urls": { "Bug Tracker": "https://github.com/raigad/python-postcodes-io/issues", "Documentation": "https://github.com/raigad/python-postcodes-io", "Homepage": "https://github.com/raigad/python-postcodes-io", "Source Code": "https://github.com/raigad/python-postcodes-io" }, "release_url": "https://pypi.org/project/postcodes-io-api/0.0.4/", "requires_dist": [ "requests" ], "requires_python": "", "summary": "A Python Wrapper for postcodes.io API", "version": "0.0.4" }, "last_serial": 4687992, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "c687ba9c0ab5f6bd57de85dfd2d0a9aa", "sha256": "e3537c4159ddf62089c1119bc7f81e94836e231f6f984097a751995e1d53a85e" }, "downloads": -1, "filename": "postcodes_io_api-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c687ba9c0ab5f6bd57de85dfd2d0a9aa", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7434, "upload_time": "2019-01-07T17:45:50", "url": "https://files.pythonhosted.org/packages/f2/c4/aa2456b8e4eeabdc7ba3a6e63642fa11aee7eb96bfdc7bc95969a0e8b99d/postcodes_io_api-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ed401a83bbc919b950abb669b10dff74", "sha256": "118dda08a8535e5bcec7a5b702d4c3ef4a7586fe9cabca6355bdb2b5ebcfeb5b" }, "downloads": -1, "filename": "postcodes_io_api-0.0.1.tar.gz", "has_sig": false, "md5_digest": "ed401a83bbc919b950abb669b10dff74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5999, "upload_time": "2019-01-07T17:45:52", "url": "https://files.pythonhosted.org/packages/a0/c3/7ba1520ed7ad407e2159a0c07999cb9f0226277e30d69c252c320392a598/postcodes_io_api-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "30f514616056f65287a759cc5c039fcc", "sha256": "3884bee538babdaaadad24e72f47e2f54c7c5dbc3ad16ccbe48606d41e4f7625" }, "downloads": -1, "filename": "postcodes_io_api-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "30f514616056f65287a759cc5c039fcc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7489, "upload_time": "2019-01-07T18:02:37", "url": "https://files.pythonhosted.org/packages/be/19/ea7b8f8df58e11894f19a8a4823c6b451ecb23e309135f6f3a51c41a6991/postcodes_io_api-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ac8522e2827bf2518b89472967e5d19c", "sha256": "3db36a11f720ba27eab27fa8ea2495ab4c071f747cdb2ac6b9041b4fac999284" }, "downloads": -1, "filename": "postcodes_io_api-0.0.2.tar.gz", "has_sig": false, "md5_digest": "ac8522e2827bf2518b89472967e5d19c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6083, "upload_time": "2019-01-07T18:02:39", "url": "https://files.pythonhosted.org/packages/ed/3b/4560665ca7eecb5d3dfa37950dff75478163ae19797d650d8031de3234db/postcodes_io_api-0.0.2.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "5a4a20356d58f61270fa086abe720ea4", "sha256": "cfe086f484ba0496485b061d4a6a422d6d6fd1c4433d642d4753ad36911bff87" }, "downloads": -1, "filename": "postcodes_io_api-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "5a4a20356d58f61270fa086abe720ea4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7612, "upload_time": "2019-01-12T07:53:15", "url": "https://files.pythonhosted.org/packages/26/77/966f119d0b2628b5e92dc7924eb9662b97ce80ffe2b571eda0a687e5b7ed/postcodes_io_api-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "85b901edaaae09072d6f3a4d5645198d", "sha256": "c36b2ae7c1c2196e8c152aab0ee36c325590aaa7c0fd1cc46bdf107ef4ecb32f" }, "downloads": -1, "filename": "postcodes_io_api-0.0.4.tar.gz", "has_sig": false, "md5_digest": "85b901edaaae09072d6f3a4d5645198d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6229, "upload_time": "2019-01-12T07:53:17", "url": "https://files.pythonhosted.org/packages/21/f5/dd5558043b1730dcf3591045a2ee09b45385081349ad8ff86e83f156150e/postcodes_io_api-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5a4a20356d58f61270fa086abe720ea4", "sha256": "cfe086f484ba0496485b061d4a6a422d6d6fd1c4433d642d4753ad36911bff87" }, "downloads": -1, "filename": "postcodes_io_api-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "5a4a20356d58f61270fa086abe720ea4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7612, "upload_time": "2019-01-12T07:53:15", "url": "https://files.pythonhosted.org/packages/26/77/966f119d0b2628b5e92dc7924eb9662b97ce80ffe2b571eda0a687e5b7ed/postcodes_io_api-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "85b901edaaae09072d6f3a4d5645198d", "sha256": "c36b2ae7c1c2196e8c152aab0ee36c325590aaa7c0fd1cc46bdf107ef4ecb32f" }, "downloads": -1, "filename": "postcodes_io_api-0.0.4.tar.gz", "has_sig": false, "md5_digest": "85b901edaaae09072d6f3a4d5645198d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6229, "upload_time": "2019-01-12T07:53:17", "url": "https://files.pythonhosted.org/packages/21/f5/dd5558043b1730dcf3591045a2ee09b45385081349ad8ff86e83f156150e/postcodes_io_api-0.0.4.tar.gz" } ] }