{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "Phone-ISO3166 |build-status| |coverage-status|\n==============================================\nSmall project to map an E.164 (international) phone number to the\nISO-3166-1 alpha 2 (two letter) country code, associated with that number.\n\nAlso provides mapping for E.212 (mobile network codes, mcc+mnc) to the country.\n\nThe package has no dependencies, and works on Py2.7+, Py3 and PyPy.\n\n\nSimple Usage\n------------\n\nTo simply get a country code from a phone number or mcc, mnc.\n\n.. code:: pycon\n\n\n >>> from phone_iso3166.country import *\n >>> phone_country(45)\n 'DK'\n >>> phone_country('+1 202-456-1111')\n 'US'\n >>> phone_country(14412921234)\n 'BM'\n >>> network_country(238, 1)\n 'DK'\n\n\nNetwork names and codes\n-----------------------\n\nIf you want more detailed information about the networks, such as the operator\nname use the functions in `phone_iso3166.network`.\n\n.. code:: pycon\n\n\n >>> from phone_iso3166.network import *\n >>> network(238, 1)\n ('DK', 'TDC Mobil')\n >>> country_networks('DK')\n [(238, 1, 'TDC Mobil'), (238, 2, 'Telenor'), (238, 3, 'MIGway A/S'),\n (238, 4, 'NextGen Mobile Ltd T/A CardBoardFish'), (238, 6, 'Hi3G'),\n (238, 8, 'Nordisk Mobiltelefon Danmark A/S'), (238, 10, 'TDC Mobil'),\n (238, 43, 'MobiWeb Limited'), (238, 12, 'Lycamobile Denmark'),\n (238, 13, 'Compatel Limited'), (238, 77, 'Tele2'), (238, 20, 'Telia'),\n (238, 66, 'TT-Netvaerket P/S'), (238, 28, 'CoolTEL'),\n (238, 30, 'Interactive Digital Media GmbH')]\n\n\nMore information\n----------------\n\nIf want more information, you can easily use the country code with other python\npackages such as `pycountry`_.\n\n.. code:: pycon\n\n\n >>> from phone_iso3166.country import phone_country\n >>> import pycountry\n >>> phone = '+55 21 3814-2121'\n >>> c = pycountry.countries.get(alpha_2=phone_country(phone))\n >>> c.name\n 'Brazil'\n >>> c.official_name\n 'Federative Republic of Brazil'\n\n\nThis package makes no attempt to understand the various input options for\nphone numbers, and assumes an international phone number. If you deal in fuzzy\ninputs, try `phonenumbers`_.\n\n.. code:: pycon\n\n\n >>> from phone_iso3166.country import phone_country\n >>> import phonenumbers\n >>> import pycountry\n >>> local = phonenumbers.parse(\"020 8366 1177\", \"GB\")\n >>> phonenumbers.format_number(local, phonenumbers.PhoneNumberFormat.E164)\n '+442083661177'\n >>> cc = phone_country(str(local.country_code)+str(local.national_number))\n >>> uk = pycountry.countries.get(alpha_2=cc)\n >>> uk.name\n 'United Kingdom'\n >>> uk.official_name\n 'United Kingdom of Great Britain and Northern Ireland'\n >>> wh = phonenumbers.parse(\"0012024561111\", \"GB\")\n >>> cc_wh = phone_country(str(wh.country_code)+str(wh.national_number))\n >>> cc_wh\n 'US'\n\n\n.. |build-status| image:: https://travis-ci.org/onlinecity/phone-iso3166.svg?branch=master\n :target: https://travis-ci.org/onlinecity/phone-iso3166\n.. |coverage-status| image:: https://img.shields.io/coveralls/onlinecity/phone-iso3166.svg\n :target: https://coveralls.io/r/onlinecity/phone-iso3166\n.. _pycountry: https://pypi.python.org/pypi/pycountry\n.. _phonenumbers: https://pypi.python.org/pypi/phonenumberslite\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "phone country mobile iso3166 e164 e212 countrycode phonenumber", "license": "MIT", "maintainer": "OC dev team", "maintainer_email": "devs@oc.dk", "name": "phone-iso3166", "package_url": "https://pypi.org/project/phone-iso3166/", "platform": "", "project_url": "https://pypi.org/project/phone-iso3166/", "project_urls": null, "release_url": "https://pypi.org/project/phone-iso3166/0.3.5/", "requires_dist": null, "requires_python": "", "summary": "Phonenumber to Country (ISO 3166-1) mapping", "version": "0.3.5" }, "last_serial": 4226049, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "fe73fe3237a454e8f143fe87e6013052", "sha256": "eefaa7e24e48b3e6693f05688e1f2c41339df52db45341193ec886373cfe2904" }, "downloads": -1, "filename": "phone-iso3166-0.1.0.tar.gz", "has_sig": false, "md5_digest": "fe73fe3237a454e8f143fe87e6013052", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31248, "upload_time": "2015-09-23T16:46:44", "url": "https://files.pythonhosted.org/packages/d7/a0/7a8f6f7ede3053a4553d61eb03ca4ec69de2c8872db0374cca94cf163926/phone-iso3166-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "ab514cb0e03b29f7a360c77d211cf441", "sha256": "47e204a5ea0e9bf4802d8f11bf276f1dec01d6dc65d6eeaeb1fcecd9ffe70426" }, "downloads": -1, "filename": "phone-iso3166-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ab514cb0e03b29f7a360c77d211cf441", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32130, "upload_time": "2015-12-31T02:14:06", "url": "https://files.pythonhosted.org/packages/58/17/8cb8a0531dab8d1885715dd2f7a5ab0e672001b77a749c3c5f705201b3aa/phone-iso3166-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "94e186908c30855e19cdfe827b3dcc14", "sha256": "141b76a1d4ee95bee953d062d76faa93d8edcd69e7ffde44fe22b46e9be23237" }, "downloads": -1, "filename": "phone-iso3166-0.1.2.tar.gz", "has_sig": false, "md5_digest": "94e186908c30855e19cdfe827b3dcc14", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32182, "upload_time": "2016-01-04T10:26:38", "url": "https://files.pythonhosted.org/packages/69/5a/77ab1737a27374ef243a40a007f2f4f118485a8de242030731e5ffec2220/phone-iso3166-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "2a99cca6c337c9517d3d908c2ab22c65", "sha256": "5f8d963faed2ad18bb4c28f17f43233bb789a3aaecee42c9dbfdafbfd87446a3" }, "downloads": -1, "filename": "phone-iso3166-0.2.0.tar.gz", "has_sig": false, "md5_digest": "2a99cca6c337c9517d3d908c2ab22c65", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32750, "upload_time": "2016-11-11T13:19:13", "url": "https://files.pythonhosted.org/packages/ac/7d/d454da99f8523bbfcf793b70b004661391ba9ee4a0f8f74139b3b6375077/phone-iso3166-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "0eb72532a932d8594d7fb96c0be4d857", "sha256": "86383f7430669e2ed7eeb9fe16d14f1c664a1b13ce2540295ad06b9179548a41" }, "downloads": -1, "filename": "phone-iso3166-0.3.0.tar.gz", "has_sig": false, "md5_digest": "0eb72532a932d8594d7fb96c0be4d857", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33015, "upload_time": "2017-01-19T10:38:30", "url": "https://files.pythonhosted.org/packages/50/a6/192a6f73b8beb5f0ca1e50b7e721db16c80b4795f7d5b33ae738b48b2754/phone-iso3166-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "bf057f974226d0cb86cf2f7eb0a3916c", "sha256": "a50e030e8f675e1ec94ca0fdf1730568e184bda4d045663e40cd141f44cd8e6d" }, "downloads": -1, "filename": "phone-iso3166-0.3.1.tar.gz", "has_sig": false, "md5_digest": "bf057f974226d0cb86cf2f7eb0a3916c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33206, "upload_time": "2017-02-16T13:00:33", "url": "https://files.pythonhosted.org/packages/98/19/03fc1e44db30850265768836e7c298511d96c6ca3ecf651a95e78f11b448/phone-iso3166-0.3.1.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "e7ca9c66aed5271c8cd1a765045c90d1", "sha256": "66630f8204e6dbb965eb536ce639c3c3a6a61709ec26a9877a28097b05e5410c" }, "downloads": -1, "filename": "phone_iso3166-0.3.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e7ca9c66aed5271c8cd1a765045c90d1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 34473, "upload_time": "2018-06-27T09:39:05", "url": "https://files.pythonhosted.org/packages/93/45/fc00f71f64edc4cce8a5d5b82ea50b7a1005b125c58b74e28d9cf9c4c22a/phone_iso3166-0.3.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "086c4cc2207bd6a6abc8ccbc0ed49882", "sha256": "8e1fd8f63e81d4ec7072f6560cf24c3fef45a5f1638e3c843f0fb724fd6ceda5" }, "downloads": -1, "filename": "phone_iso3166-0.3.3-py3-none-any.whl", "has_sig": false, "md5_digest": "086c4cc2207bd6a6abc8ccbc0ed49882", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 34469, "upload_time": "2018-06-27T09:39:06", "url": "https://files.pythonhosted.org/packages/77/f4/f6ce1ed148566a9f67456f7704b9b815acf5e69b8b420b0c70906296faa8/phone_iso3166-0.3.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "df1f4fad70914034e78dc1b8941eeff1", "sha256": "796e6636710189c6e104d2111fbbf903f9ca54942abdbb1d101c0a22b3c7384a" }, "downloads": -1, "filename": "phone-iso3166-0.3.3.tar.gz", "has_sig": false, "md5_digest": "df1f4fad70914034e78dc1b8941eeff1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34121, "upload_time": "2018-08-29T14:12:38", "url": "https://files.pythonhosted.org/packages/83/12/0ed405ce5e411c8eb5a86147e4c3da10429ea029c8285efe0a88c1200f1a/phone-iso3166-0.3.3.tar.gz" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "1d2b6a86e184c83f62e9ed352db35ff1", "sha256": "991b399b158c785e1cee55cfeb6c0fbb71377389d11233d67c4cfe8f7d3b58fe" }, "downloads": -1, "filename": "phone_iso3166-0.3.4-py3-none-any.whl", "has_sig": false, "md5_digest": "1d2b6a86e184c83f62e9ed352db35ff1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 34321, "upload_time": "2018-08-29T14:10:31", "url": "https://files.pythonhosted.org/packages/97/28/811a860d78df49cf0088c8bad90472cb8cf378090ae62a1319914027063d/phone_iso3166-0.3.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4e55d4180e3e10699aa0f4e964bcfd47", "sha256": "9f36246fc5b55acb53b53ed0d816a1b617cc49e262c8432920f48906aed1da9a" }, "downloads": -1, "filename": "phone-iso3166-0.3.4.tar.gz", "has_sig": false, "md5_digest": "4e55d4180e3e10699aa0f4e964bcfd47", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33202, "upload_time": "2018-08-29T14:07:35", "url": "https://files.pythonhosted.org/packages/20/00/d1b1d3f0a73fd85745a8d0d69090bc40116744622a93b2311ae5bcb61dd6/phone-iso3166-0.3.4.tar.gz" } ], "0.3.5": [ { "comment_text": "", "digests": { "md5": "885dd376f2367c3deff5ef7c7efb90f4", "sha256": "3bb228ab163796ef83745347b94af1480e9f5ee12fa6e0b4700947d3ce2864e4" }, "downloads": -1, "filename": "phone_iso3166-0.3.5-py3-none-any.whl", "has_sig": false, "md5_digest": "885dd376f2367c3deff5ef7c7efb90f4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 38003, "upload_time": "2018-08-31T11:08:26", "url": "https://files.pythonhosted.org/packages/59/cb/8e9e6bd837dea2c14543f681537ec3f28fbbddc36aaff298e7db13fb9f4b/phone_iso3166-0.3.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8e9618b6202459ad8435be7bcbf95d7b", "sha256": "3d067390779764d83983ba813b118cd22c6c456bbe08974e521446f281ae3380" }, "downloads": -1, "filename": "phone-iso3166-0.3.5.tar.gz", "has_sig": false, "md5_digest": "8e9618b6202459ad8435be7bcbf95d7b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36984, "upload_time": "2018-08-31T11:09:15", "url": "https://files.pythonhosted.org/packages/2c/8a/d1b9e3e57e6af415167b14dd48f2af363d3cd5478b523c810c223227cbad/phone-iso3166-0.3.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "885dd376f2367c3deff5ef7c7efb90f4", "sha256": "3bb228ab163796ef83745347b94af1480e9f5ee12fa6e0b4700947d3ce2864e4" }, "downloads": -1, "filename": "phone_iso3166-0.3.5-py3-none-any.whl", "has_sig": false, "md5_digest": "885dd376f2367c3deff5ef7c7efb90f4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 38003, "upload_time": "2018-08-31T11:08:26", "url": "https://files.pythonhosted.org/packages/59/cb/8e9e6bd837dea2c14543f681537ec3f28fbbddc36aaff298e7db13fb9f4b/phone_iso3166-0.3.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8e9618b6202459ad8435be7bcbf95d7b", "sha256": "3d067390779764d83983ba813b118cd22c6c456bbe08974e521446f281ae3380" }, "downloads": -1, "filename": "phone-iso3166-0.3.5.tar.gz", "has_sig": false, "md5_digest": "8e9618b6202459ad8435be7bcbf95d7b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36984, "upload_time": "2018-08-31T11:09:15", "url": "https://files.pythonhosted.org/packages/2c/8a/d1b9e3e57e6af415167b14dd48f2af363d3cd5478b523c810c223227cbad/phone-iso3166-0.3.5.tar.gz" } ] }