{ "info": { "author": "Christian Theune", "author_email": "ct@gocept.com", "bugtrack_url": null, "classifiers": [], "description": "=========\npycountry\n=========\n\npycountry provides the ISO databases for the standards:\n\n639\n Languages\n\n3166\n Countries\n\n3166-2\n Subdivisions of countries\n\n4217\n Currencies\n\n15924\n Scripts\n\nThe package includes a copy from Debian's `pkg-isocodes` and makes the data\naccessible through a Python API.\n\nTranslation files for the various strings are included as well.\n\nBuild status\n============\n\npycountry\n .. image:: https://builds.gocept.com/job/pycountry/badge/icon\n :target: https://builds.gocept.com/job/pycountry/\n\nCountries (ISO 3166)\n====================\n\nCountries are accessible through a database object that is already configured\nupon import of pycountry and works as an iterable:\n\n >>> import pycountry\n >>> len(pycountry.countries)\n 249\n >>> list(pycountry.countries)[0]\n \n\nSpecific countries can be looked up by their various codes and provide the\ninformation included in the standard as attributes:\n\n >>> germany = pycountry.countries.get(alpha2='DE')\n >>> germany\n \n >>> germany.alpha2\n u'DE'\n >>> germany.alpha3\n u'DEU'\n >>> germany.numeric\n u'276'\n >>> germany.name\n u'Germany'\n >>> germany.official_name\n u'Federal Republic of Germany'\n\nNote that historic countries, defined by the ISO 3166-3 sub-standard are not\nincluded in this list.\n\nCountry subdivisions (ISO 3166-2)\n=================================\n\nThe country subdivisions are a little more complex than the countries itself\nbecause they provide a nested and typed structure.\n\nAll subdivisons can be accessed directly:\n\n >>> len(pycountry.subdivisions)\n 4847\n >>> list(pycountry.subdivisions)[0]\n \n\nSubdivisions can be accessed using their unique code and provide at least\ntheir code, name and type:\n\n >>> de_st= pycountry.subdivisions.get(code='DE-ST')\n >>> de_st.code\n u'DE-ST'\n >>> de_st.name\n u'Sachsen-Anhalt'\n >>> de_st.type\n u'State'\n >>> de_st.country\n \n\nSome subdivisions specify another subdivision as a parent:\n\n >>> al_br = pycountry.subdivisions.get(code='AL-BU')\n >>> al_br.code\n u'AL-BU'\n >>> al_br.name\n u'Bulqiz\\xeb'\n >>> al_br.type\n u'District'\n >>> al_br.parent_code\n u'AL-09'\n >>> al_br.parent\n \n >>> al_br.parent.name\n u'Dib\\xebr'\n\nThe divisions of a single country can be queried using the country_code index:\n\n >>> len(pycountry.subdivisions.get(country_code='DE'))\n 16\n\n >>> len(pycountry.subdivisions.get(country_code='US'))\n 57\n\n\nScripts (ISO 15924)\n===================\n\nScripts are available from a database similar to the countries:\n\n >>> len(pycountry.scripts)\n 163\n >>> list(pycountry.scripts)[0]\n \n\n >>> latin = pycountry.scripts.get(name='Latin')\n >>> latin\n \n >>> latin.alpha4\n u'Latn'\n >>> latin.name\n u'Latin'\n >>> latin.numeric\n u'215'\n\n\nCurrencies (ISO 4217)\n=====================\n\nThe currencies database is, again, similar to the ones before:\n\n >>> len(pycountry.currencies)\n 182\n >>> list(pycountry.currencies)[0]\n \n\n >>> argentine_peso = pycountry.currencies.get(letter='ARS')\n >>> argentine_peso\n \n >>> argentine_peso.letter\n u'ARS'\n >>> argentine_peso.name\n u'Argentine Peso'\n >>> argentine_peso.numeric\n u'032'\n\n\nLanguages (ISO 639)\n===================\n\nThe languages database is similar too:\n\n >>> len(pycountry.languages)\n 487\n >>> list(pycountry.languages)[0]\n \n\n >>> aragonese = pycountry.languages.get(alpha2='an')\n >>> aragonese.alpha2\n u'an'\n >>> aragonese.bibliographic\n u'arg'\n >>> aragonese.terminology\n u'arg'\n >>> aragonese.name\n u'Aragonese'\n\n >>> bengali = pycountry.languages.get(alpha2='bn')\n >>> bengali.name\n u'Bengali'\n >>> bengali.common_name\n u'Bangla'\n\nLocales\n=======\n\nLocales are available in the `pycountry.LOCALES_DIR` subdirectory of this\npackage. The translation domains are called `isoXXX` according to the standard\nthey provide translations for. The directory is structured in a way compatible\nto Python's gettext module.\n\nHere is an example translating language names:\n\n >>> import gettext\n >>> german = gettext.translation('iso3166', pycountry.LOCALES_DIR,\n ... languages=['de'])\n >>> german.install()\n >>> _('Germany')\n 'Deutschland'\n\nChanges\n=======\n\n0.16 (unreleased)\n-----------------\n\n- Nothing changed yet.\n\n\n0.15 (2013-06-22)\n-----------------\n\n- Update to iso-codes 3.43.\n\n- Switch testing to pytest.\n\n- Make Python 3 compatible.\n\n\n0.14.8 (2013-02-25)\n-------------------\n\n- Update to iso-codes 3.41.\n\n\n0.14.7 (2012-11-03)\n-------------------\n\n- Update to iso-codes 3.40.\n\n- Adapt Language objects to include `common_name` attribute added in iso-codes\n 3.40.\n\n0.14.6 (2012-10-02)\n-------------------\n\n- Update to iso-codes 3.39.\n\n\n0.14.5 (2012-09-14)\n-------------------\n\n- Re-add the patch that should have been 0.14.4. Migrating to mercurial caused\n me to miss it.\n\n\n0.14.4 (2012-09-14)\n-------------------\n\n- Explicitly unlink DOM tree to support (faster) memory deallocation. Thanks to\n Romuald Brunet.\n\n\n0.14.3 (2012-09-04)\n-------------------\n\n- Update data to iso-codes 3.38.\n\n\n0.14.2 (2012-07-18)\n-------------------\n\n- Update data to iso-codes 3.37.\n\n\n0.14.1 (2011-07-15)\n-------------------\n\n- Nothing changed yet.\n\n\n0.14 (2011-07-06)\n-----------------\n\n- Update data to iso-codes 3.26.\n\n\n0.13 (2010-04-23)\n-----------------\n\n- Applied patch from Pedro Araujo which removes the somewhat superfluous\n dependency on lxml to the builtin minidom. This seems to consistently turn\n all strings into unicode even if they only contain ASCII characters.\n\n\n0.12.1 (2010-04-21)\n-------------------\n\n- Remedy brown-bag release 0.12 which was missing all data files due to a bad\n interaction between the build system for the data and zest.releaeser's\n full-release script.\n\n\n0.12 (2010-04-20)\n-----------------\n\n- Follow Debian repository to git.\n\n- Upgrade data to revision 770fa9cd603f90f9fb982b32fe6f45d253f1d33e as\n requested by #5488 and others.\n\n- Reflect subdivision changes with how they reference their parents in the XML\n (they used to use space as a separator but now use a hyphen).\n\n- Refactor index building structures a bit.\n\n- Remove superfluous 'code' index from subdivision database. (Together with\n the data upgrade this also gets rid of all the annoying warnings as\n described in #6667).\n\n- Some light PEP 8 improvements.\n\n0.11 (2009-03-03)\n-----------------\n\n- Updated Debian repository to r1752.\n\n\n0.10 (2008-06-26)\n-----------------\n\n- Added support for country subdivisions (ISO 3166-2). \n\n\n0.9\n---\n\n- Initial release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": "country subdivision language currency iso 3166 639 4217 15924 3166-2", "license": "LGPL 2.1", "maintainer": null, "maintainer_email": null, "name": "pycountry-nopytest", "package_url": "https://pypi.org/project/pycountry-nopytest/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pycountry-nopytest/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/pycountry-nopytest/0.16.dev0/", "requires_dist": null, "requires_python": null, "summary": "ISO country, subdivision, language, currency and script definitions and their translations", "version": "0.16.dev0" }, "last_serial": 812339, "releases": { "0.16.dev0": [ { "comment_text": "", "digests": { "md5": "32cc5c5b9e860ad32380e84f61774b58", "sha256": "9b59e643aec19bdc0309f0b66d632bd83906e6e93c1b17df81f48f833e89e6b7" }, "downloads": -1, "filename": "pycountry-nopytest-0.16.dev0.tar.gz", "has_sig": false, "md5_digest": "32cc5c5b9e860ad32380e84f61774b58", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7444756, "upload_time": "2013-07-10T07:38:45", "url": "https://files.pythonhosted.org/packages/70/2f/db9e55db9ba3a4b28cb34b970567164252927da183e2d823e742dd65b8c7/pycountry-nopytest-0.16.dev0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "32cc5c5b9e860ad32380e84f61774b58", "sha256": "9b59e643aec19bdc0309f0b66d632bd83906e6e93c1b17df81f48f833e89e6b7" }, "downloads": -1, "filename": "pycountry-nopytest-0.16.dev0.tar.gz", "has_sig": false, "md5_digest": "32cc5c5b9e860ad32380e84f61774b58", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7444756, "upload_time": "2013-07-10T07:38:45", "url": "https://files.pythonhosted.org/packages/70/2f/db9e55db9ba3a4b28cb34b970567164252927da183e2d823e742dd65b8c7/pycountry-nopytest-0.16.dev0.tar.gz" } ] }