{ "info": { "author": "Dmitrii K", "author_email": "winston.smith.spb@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3.6" ], "description": "ip-country\n==========\n\nAn offline tool to get country by IP\n\nRequirements\n------------\n\n- Python >= 3.6\n- IP2Location\u2122 LITE IP-COUNTRY-REGION-CITY Database\n\nInstallation\n------------\n\n1. Download IP2Location database for IPv4 from\n `https://lite.ip2location.com/database/ip-country-region-city `__\n\n2. Install library:\n\n``pip install ip_country``\n\nUsage\n-----\n\n::\n\n >>> from pprint import pprint\n >>> from ip_country import IPCountry\n >>> ip = IPCountry('/path/to/ipdb.csv')\n >>> ip_data = ip.get_ip_data('13.73.96.0')\n >>> pprint(ip_data)\n {'city_name': 'Melbourne',\n 'country_code': 'AU',\n 'country_name': 'Australia',\n 'error': None,\n 'ip': '13.73.96.0',\n 'region_name': 'Victoria'}\n\n >>> ip_data = ip.get_ip_data('blah.73.96.0')\n >>> pprint(ip_data)\n {'error': \"Only decimal digits permitted in 'blah' in 'blah.73.96.0'\",\n 'ip': 'blah.73.96.0'}\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dmitriiweb/ip-country", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ip-country", "package_url": "https://pypi.org/project/ip-country/", "platform": "", "project_url": "https://pypi.org/project/ip-country/", "project_urls": { "Homepage": "https://github.com/dmitriiweb/ip-country" }, "release_url": "https://pypi.org/project/ip-country/1.0.0/", "requires_dist": [ "pandas (>=0.25.0)" ], "requires_python": "", "summary": "An offline tool to get country by IP", "version": "1.0.0" }, "last_serial": 5697688, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "7a71352482bd3daefe017c3177add47b", "sha256": "4d3cee970d88fd55314dc9c7af47ddb491ee791c52bb9d789912c8e3207b409e" }, "downloads": -1, "filename": "ip_country-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7a71352482bd3daefe017c3177add47b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3775, "upload_time": "2019-08-19T10:17:31", "url": "https://files.pythonhosted.org/packages/64/b7/89fb475397fbcf3f5d90537c839d25476c99fdd791afa1db5c4c2b66be45/ip_country-1.0.0-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7a71352482bd3daefe017c3177add47b", "sha256": "4d3cee970d88fd55314dc9c7af47ddb491ee791c52bb9d789912c8e3207b409e" }, "downloads": -1, "filename": "ip_country-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7a71352482bd3daefe017c3177add47b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3775, "upload_time": "2019-08-19T10:17:31", "url": "https://files.pythonhosted.org/packages/64/b7/89fb475397fbcf3f5d90537c839d25476c99fdd791afa1db5c4c2b66be45/ip_country-1.0.0-py3-none-any.whl" } ] }