{ "info": { "author": "Porimol Chandro", "author_email": "porimolchandroroy@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.5" ], "description": "Country Info\n============\n\nA python module for returning data about countries, ISO info and\nstates/provinces within them.\n\nTable of Contents\n-----------------\n\n- `Install <#install>`__\n- `API Usage <#api-usage>`__\n\nAPIs\n----\n\n- `.info() <#info>`__\n- `.provinces() <#provinces>`__\n- `.alt\\_spellings() <#alt_spellings>`__\n- `.area() <#area>`__\n- `.borders() <#borders>`__\n- `.calling\\_codes() <#calling_codes>`__\n- `.capital() <#capital>`__\n- `.currencies() <#currencies>`__\n- `.demonym() <#demonym>`__\n- `.geojson()\\` <#geo_json>`__\n- `.iso() <#iso>`__\n- `.languages() <#languages>`__\n- `.latlng() <#latlng>`__\n- `.native\\_name() <#native_name>`__\n- `.population() <#population>`__\n- `.region() <#region>`__\n- `.subregion() <#subregion>`__\n- `.timezones() <#timezones>`__\n- `.tld() <#tld>`__\n- `.translations() <#translations>`__\n- `.wiki() <#wiki>`__\n- `.all() <#all>`__\n\nAcknowledgement\n---------------\n\n- `Special Thanks <#special-thanks>`__\n- `Contributing <#contributing>`__\n- `Changelog <#changelog>`__\n- `Disclaimer <#disclaimer>`__\n- `License (MIT) <#license>`__\n\nInstall\n-------\n\n.. code:: python\n\n pip install countryinfo\n\nOR, git clone\n\n.. code:: python\n\n git clone https://github.com/porimol/countryinfo.git\n\n cd countryinfo\n python setup.py install\n\nAPI Usage\n---------\n\nTo access one of the country properties available, you'll need to use\none of the API methods listed below and pass a country in either way.\n\n.info()\n~~~~~~~\n\nReturns all available information for a specified country.\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo('Singapore')\n country.info()\n # returns object,\n {\n 'ISO': {\n 'alpha2': 'SG',\n 'alpha3': 'SGP'\n },\n 'altSpellings': [\n 'SG',\n 'Singapura',\n 'Republik Singapura',\n '\u65b0\u52a0\u5761\u5171\u548c\u56fd'\n ],\n 'area': 710,\n 'borders': [],\n 'callingCodes': ['65'],\n 'capital': 'Singapore',\n 'currencies': ['SGD'],\n 'demonym': 'Singaporean',\n 'flag': '',\n 'geoJSON': {},\n 'languages': [\n 'en',\n 'ms',\n 'ta',\n 'zh'\n ],\n 'latlng': [\n 1.36666666,\n 103.8\n ],\n 'name': 'Singapore',\n 'nativeName': 'Singapore',\n 'population': 5469700,\n 'provinces': ['Singapore'],\n 'region': 'Asia',\n 'subregion': 'South-Eastern Asia',\n 'timezones': ['UTC+08:00'],\n 'tld': ['.sg'],\n 'translations': {\n 'de': 'Singapur',\n 'es': 'Singapur',\n 'fr': 'Singapour',\n 'it': 'Singapore',\n 'ja': '\u30b7\u30f3\u30ac\u30dd\u30fc\u30eb'\n },\n 'wiki': 'http://en.wikipedia.org/wiki/singapore'\n }\n\n.provinces()\n~~~~~~~~~~~~\n\nReturn provinces list\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo('Singapore')\n country.provinces()\n # returns object,\n ['Singapore']\n\n.alt\\_pellings()\n~~~~~~~~~~~~~~~~\n\nReturns alternate spellings for the name of a specified country\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo('Singapore')\n country.alt_spellings()\n # returns list of strings, alternate names\n # ['SG', 'Singapura', 'Republik Singapura', '\u65b0\u52a0\u5761\u5171\u548c\u56fd']\n\n.area()\n~~~~~~~\n\nReturns area (km\u00b2) for a specified country\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo('Singapore')\n country.area()\n # returns number of square kilometer area\n 710\n\n.borders()\n~~~~~~~~~~\n\nReturns bordering countries (ISO3) for a specified country\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo('Singapore')\n country.borders()\n # returns array of strings, ISO3 codes of countries that border the given country\n []\n\n.calling\\_codes()\n~~~~~~~~~~~~~~~~~\n\nReturns international calling codes for a specified country\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo('Singapore')\n country.calling_codes()\n # returns array of calling code strings\n ['65']\n\n.capital()\n~~~~~~~~~~\n\nReturns capital city for a specified country\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo('Singapore')\n country.capital()\n # returns string\n 'Singapore'\n\n.currencies()\n~~~~~~~~~~~~~\n\nReturns official currencies for a specified country\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo('Singapore')\n country.currencies()\n # returns array of strings, currencies\n # ['SGD']\n\n.demonym()\n~~~~~~~~~~\n\nReturns the `demonyms `__ for a\nspecified country\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo('Singapore')\n country.demonym()\n # returns string, name of residents\n 'Singaporean'\n\n.geo\\_json()\n~~~~~~~~~~~~\n\nReturns `geoJSON `__ for a\nspecified country\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo('Bangladesh')\n country.geo_json()\n # returns object of GeoJSON data\n\n {\n 'features': [\n {\n 'geometry': {\n 'coordinates': [[[92.672721, 22.041239],\n [92.652257, 21.324048],\n [92.303234, 21.475485],\n [92.368554, 20.670883],\n [92.082886, 21.192195],\n [92.025215, 21.70157],\n [91.834891, 22.182936],\n [91.417087, 22.765019],\n [90.496006, 22.805017],\n [90.586957, 22.392794],\n [90.272971, 21.836368],\n [89.847467, 22.039146],\n [89.70205, 21.857116],\n [89.418863, 21.966179],\n [89.031961, 22.055708],\n [88.876312, 22.879146],\n [88.52977, 23.631142],\n [88.69994, 24.233715],\n [88.084422, 24.501657],\n [88.306373, 24.866079],\n [88.931554, 25.238692],\n [88.209789, 25.768066],\n [88.563049, 26.446526],\n [89.355094, 26.014407],\n [89.832481, 25.965082],\n [89.920693, 25.26975],\n [90.872211, 25.132601],\n [91.799596, 25.147432],\n [92.376202, 24.976693],\n [91.915093, 24.130414],\n [91.46773, 24.072639],\n [91.158963, 23.503527],\n [91.706475, 22.985264],\n [91.869928, 23.624346],\n [92.146035, 23.627499],\n [92.672721, 22.041239]]],\n 'type': 'Polygon'\n },\n 'id': 'BGD',\n 'properties': {'name': 'Bangladesh'},\n 'type': 'Feature'}],\n 'type': 'FeatureCollection'\n }\n\n.iso()\n~~~~~~\n\nReturns ISO codes for a specified country\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo('Singapore')\n country.iso()\n # returns object of ISO codes\n {'alpha2': 'SG', 'alpha3': 'SGP'}\n\n country.iso(2)\n # returns object of ISO codes\n 'SG'\n\n\n country.iso(3)\n # returns object of ISO codes\n 'SGP'\n\n.languages()\n~~~~~~~~~~~~\n\nReturns official languages for a specified country\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo('Singapore')\n country.languages()\n # returns array of language codes\n ['en', 'ms', 'ta', 'zh']\n\n.latlng()\n~~~~~~~~~\n\nReturns approx latitude and longitude for a specified country\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo('Singapore')\n country.latlng()\n # returns array, approx latitude and longitude for country\n [1.36666666, 103.8]\n\n.native\\_name()\n~~~~~~~~~~~~~~~\n\nReturns the name of the country in its native tongue\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo('Singapore')\n country.native_name()\n # returns string, name of country in native language\n 'Singapore'\n\n.population()\n~~~~~~~~~~~~~\n\nReturns approximate population for a specified country\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo('Singapore')\n country.population()\n # returns number, approx population\n 5469700\n\n.region()\n~~~~~~~~~\n\nReturns general region for a specified country\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo('Singapore')\n country.region()\n # returns string\n 'Asia'\n\n.subregion()\n~~~~~~~~~~~~\n\nReturns a more specific region for a specified country\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo('Singapore')\n country.subregion()\n # returns string\n 'South-Eastern Asia'\n\n.timezones()\n~~~~~~~~~~~~\n\nReturns all timezones for a specified country\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo('Singapore')\n country.timezones()\n # returns array of timezones\n ['UTC+08:00']\n\n.tld()\n~~~~~~\n\nReturns official `top level\ndomains `__ for a\nspecified country\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo('Singapore')\n country.tld()\n # returns array of top level domains specific to the country\n ['.sg']\n\n.translations()\n~~~~~~~~~~~~~~~\n\nReturns translations for a specified country name in popular languages\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo('Singapore')\n country.translations()\n # returns object of translations of country name in major languages\n {\n 'de': 'Singapur',\n 'es': 'Singapur',\n 'fr': 'Singapour',\n 'it': 'Singapore',\n 'ja': '\u30b7\u30f3\u30ac\u30dd\u30fc\u30eb'\n }\n\n.wiki()\n~~~~~~~\n\nReturns link to wikipedia page for a specified country\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo('Singapore')\n country.wiki()\n # returns string URL of wikipedia article on country\n 'http://en.wikipedia.org/wiki/singapore'\n\n.all()\n~~~~~~\n\nReturns array of objects containing all available data for all\ncountries. This will be super big. Not recommended.\n\n.. code:: python\n\n # coding=utf-8\n from countryinfo import CountryInfo\n\n\n country = CountryInfo()\n country.all()\n # returns array of objects,\n {\n 'zimbabwe': {'ISO': {'alpha2': 'ZW', 'alpha3': 'ZWE'},\n 'altSpellings': ['ZW', 'Republic of Zimbabwe'],\n 'area': 390757,\n 'borders': ['BWA', 'MOZ', 'ZAF', 'ZMB'],\n 'callingCodes': ['263'],\n 'capital': 'Harare',\n 'currencies': ['USD'],\n 'demonym': 'Zimbabwean',\n 'flag': '',\n 'geoJSON': {'features': [{'geometry': {'coordinates': [[[31.191409,\n -22.25151],\n [30.659865,\n -22.151567],\n [30.322883,\n -22.271612],\n [29.839037,\n -22.102216],\n [29.432188,\n -22.091313],\n [28.794656,\n -21.639454],\n [28.02137,\n -21.485975],\n [27.727228,\n -20.851802],\n [27.724747,\n -20.499059],\n [27.296505,\n -20.39152],\n [26.164791,\n -19.293086],\n [25.850391,\n -18.714413],\n [25.649163,\n -18.536026],\n [25.264226,\n -17.73654],\n [26.381935,\n -17.846042],\n [26.706773,\n -17.961229],\n [27.044427,\n -17.938026],\n [27.598243,\n -17.290831],\n [28.467906,\n -16.4684],\n [28.825869,\n -16.389749],\n [28.947463,\n -16.043051],\n [29.516834,\n -15.644678],\n [30.274256,\n -15.507787],\n [30.338955,\n -15.880839],\n [31.173064,\n -15.860944],\n [31.636498,\n -16.07199],\n [31.852041,\n -16.319417],\n [32.328239,\n -16.392074],\n [32.847639,\n -16.713398],\n [32.849861,\n -17.979057],\n [32.654886,\n -18.67209],\n [32.611994,\n -19.419383],\n [32.772708,\n -19.715592],\n [32.659743,\n -20.30429],\n [32.508693,\n -20.395292],\n [32.244988,\n -21.116489],\n [31.191409,\n -22.25151]]],\n 'type': 'Polygon'},\n 'id': 'ZWE',\n 'properties': {'name': 'Zimbabwe'},\n 'type': 'Feature'}],\n 'type': 'FeatureCollection'},\n 'languages': ['en', 'sn', 'nd'],\n 'latlng': [-20, 30],\n 'name': 'Zimbabwe',\n 'nativeName': 'Zimbabwe',\n 'population': 13061239,\n 'provinces': ['Bulawayo',\n 'Harare',\n 'ManicalandMashonaland Central',\n 'Mashonaland East',\n 'Mashonaland'],\n 'region': 'Africa',\n 'subregion': 'Eastern Africa',\n 'timezones': ['UTC+02:00'],\n 'tld': ['.zw'],\n 'translations': {'de': 'Simbabwe',\n 'es': 'Zimbabue',\n 'fr': 'Zimbabwe',\n 'it': 'Zimbabwe',\n 'ja': '\u30b8\u30f3\u30d0\u30d6\u30a8'},\n 'wiki': 'http://en.wikipedia.org/wiki/zimbabwe'}\n }\n\nSpecial Thanks\n--------------\n\nSpecial thanks to johan for his work on\n`johan/world.geo.json `__, who\nmade the geojson portion of this build possible.\n\nInspired By\n-----------\n\nRepo: `countryjs `__\n\nMaintainer: `Oz Haven `__\n\nContributing\n------------\n\nSee the list of\n`contributors `__\nwho participated in this project.\n\nHow to become a contributor\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nIf you want to contribute to ``countryinfo`` and make it better, your\nhelp is very welcome. You can make constructive, helpful bug reports,\nfeature requests and the noblest of all contributions. If like to\ncontribute in a good way, then follow the following guidelines.\n\nHow to make a clean pull request\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n- Create a personal fork on Github.\n- Clone the fork on your local machine.(Your remote repo on Github is\n called ``origin``.)\n- Add the original repository as a remote called ``upstream``.\n- If you created your fork a while ago be sure to pull upstream changes\n into your local repository.\n- Create a new branch to work on! Branch from ``dev``.\n- Implement/fix your feature, comment your code.\n- Follow ``countryinfo``'s code style, including indentation(4 spaces).\n- Write or adapt tests as needed.\n- Add or change the documentation as needed.\n- Push your branch to your fork on Github, the remote ``origin``.\n- From your fork open a pull request to the ``dev`` branch.\n- Once the pull request is approved and merged, please pull the changes\n from ``upstream`` to your local repo and delete your extra\n branch(es).\n\nDisclaimer\n----------\n\nThis is being maintained in the contributor's free time, and as such,\nmay contain minor errors in regards to some countries. Most of the\ninformation included in this library is what is listed on Wikipedia. If\nthere is an error, please let me know and I will do my best to correct\nit.\n\nLicense\n-------\n\n`The MIT License `__\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nCopyright (c) 2018, Porimol Chandro porimolchandroroy@gmail.com\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/porimol/countryinfo", "keywords": "countryinfo", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "countryinfo", "package_url": "https://pypi.org/project/countryinfo/", "platform": "", "project_url": "https://pypi.org/project/countryinfo/", "project_urls": { "Homepage": "https://github.com/porimol/countryinfo" }, "release_url": "https://pypi.org/project/countryinfo/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "countryinfo is a python module for returning data about countries, ISO info and states/provinces within them.", "version": "0.1.0" }, "last_serial": 3830065, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "ce83f457d2a5a2c082bfcce56fda8349", "sha256": "f04256f8ad4436a5150d2b5f7f626a8af44327b05c5acf660a7cf6adf323acd7" }, "downloads": -1, "filename": "countryinfo-0.1.0.tar.gz", "has_sig": false, "md5_digest": "ce83f457d2a5a2c082bfcce56fda8349", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 202438, "upload_time": "2018-05-03T08:39:53", "url": "https://files.pythonhosted.org/packages/b1/f3/71c45e391eb8cc3a1641313fac6d013ef46b9ec23594943723e3d7ef247a/countryinfo-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ce83f457d2a5a2c082bfcce56fda8349", "sha256": "f04256f8ad4436a5150d2b5f7f626a8af44327b05c5acf660a7cf6adf323acd7" }, "downloads": -1, "filename": "countryinfo-0.1.0.tar.gz", "has_sig": false, "md5_digest": "ce83f457d2a5a2c082bfcce56fda8349", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 202438, "upload_time": "2018-05-03T08:39:53", "url": "https://files.pythonhosted.org/packages/b1/f3/71c45e391eb8cc3a1641313fac6d013ef46b9ec23594943723e3d7ef247a/countryinfo-0.1.0.tar.gz" } ] }