{ "info": { "author": "Sveinbjorn Thordarson", "author_email": "sveinbjorn@sveinbjorn.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "# cityloc\n\n### Look up world city coordinates and country codes\n\nPython (2 and 3) module to look up world city locations and country codes.\nUses data from the Basic World Cities Database provided by Simplemaps.com. The data is licensed under the [Creative Commons Attribution 4.0 license](https://creativecommons.org/licenses/by/4.0/).\n\n\n\n## Installation\n\n```\n$ pip install cityloc\n```\n\n## Examples\n\n### Look up city\n\n```python\n>>> from cityloc import city_lookup\n>>> r = city_lookup('London', country='GB')\n>>> pprint.pprint(r)\n[{'capital': 1,\n 'country': 'GB',\n 'id': 6911,\n 'lat_wgs84': 51.5,\n 'long_wgs84': -0.1167,\n 'name': 'London',\n 'name_ascii': 'London',\n 'population': 8567000,\n 'region': ''}]\n```\n\n### Look up capital city for country\n\n```python\n>>> from cityloc import capital_for_cc\n>>> r = capital_for_cc(\"FR\")\n>>> pprint.pprint(r)\n{'capital': 1,\n 'country': 'FR',\n 'id': 6687,\n 'lat_wgs84': 48.8667,\n 'long_wgs84': 2.3333,\n 'name': 'Paris',\n 'name_ascii': 'Paris',\n 'population': 9904000,\n 'region': '\u00cele-de-France'}\n```\n\n## Version History\n\n* 0.1.1: Added capital_for_cc (17/09/2019)\n* 0.1.0: Initial release (03/01/2019)\n\n## BSD License \n\nCopyright (C) 2019 Sveinbjorn Thordarson\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n\n1. Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\n2. Redistributions in binary form must reproduce the above copyright notice, this\nlist of conditions and the following disclaimer in the documentation and/or other\nmaterials provided with the distribution.\n\n3. Neither the name of the copyright holder nor the names of its contributors may\nbe used to endorse or promote products derived from this software without specific\nprior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\nIN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\nINDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\nNOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\nPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\nWHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.", "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/sveinbjornt/cityloc", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "cityloc", "package_url": "https://pypi.org/project/cityloc/", "platform": "", "project_url": "https://pypi.org/project/cityloc/", "project_urls": { "Homepage": "https://github.com/sveinbjornt/cityloc" }, "release_url": "https://pypi.org/project/cityloc/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "Look up world city coordinates and country codes", "version": "0.1.1" }, "last_serial": 5842243, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "98c3be7d0460a8cfd7af89064b072124", "sha256": "ad99ebeca1a0e8a40977882dfc0133ff03c0e45b626589f57e64f374d0f38695" }, "downloads": -1, "filename": "cityloc-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "98c3be7d0460a8cfd7af89064b072124", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 479836, "upload_time": "2019-01-03T12:29:25", "url": "https://files.pythonhosted.org/packages/17/56/9cd7bdd2f502b679c92e14e191febf4dffc3fc6a0a0e497bede560bd95c4/cityloc-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "51feb7c3fda83c9b1aee8c65a6434343", "sha256": "d566fd9f5d1edb329353a6e2cb053c3c2937fa924161658d3033a6eb4b933a10" }, "downloads": -1, "filename": "cityloc-0.1.0.tar.gz", "has_sig": false, "md5_digest": "51feb7c3fda83c9b1aee8c65a6434343", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 479668, "upload_time": "2019-01-03T12:29:28", "url": "https://files.pythonhosted.org/packages/62/df/1c16dcc8a089b762c0b722720bc5a6ff5a1ad4f1636ae6456d54a8daf6bc/cityloc-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "63529c119dabd4cf93b4a3315e68726f", "sha256": "936cefdfb60cd299bcf6bc116d7b545d4d5b69fbd9bfaa2b0f59301ae6d89f00" }, "downloads": -1, "filename": "cityloc-0.1.1.tar.gz", "has_sig": false, "md5_digest": "63529c119dabd4cf93b4a3315e68726f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 480107, "upload_time": "2019-09-17T15:19:51", "url": "https://files.pythonhosted.org/packages/bd/0b/4996a8a0c00cb0695847a4b32ecc84430f6a15ff53af6810bc2086171a2f/cityloc-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "63529c119dabd4cf93b4a3315e68726f", "sha256": "936cefdfb60cd299bcf6bc116d7b545d4d5b69fbd9bfaa2b0f59301ae6d89f00" }, "downloads": -1, "filename": "cityloc-0.1.1.tar.gz", "has_sig": false, "md5_digest": "63529c119dabd4cf93b4a3315e68726f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 480107, "upload_time": "2019-09-17T15:19:51", "url": "https://files.pythonhosted.org/packages/bd/0b/4996a8a0c00cb0695847a4b32ecc84430f6a15ff53af6810bc2086171a2f/cityloc-0.1.1.tar.gz" } ] }