{ "info": { "author": "Daniel Roy Greenfeld", "author_email": "pydanny@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6" ], "description": "===========\nGeo IP\n===========\n\nNote: This is a friendly Python 3 port of [python-geo-ip](https://github.com/avindak/python-geo-ip) by Avi Asher. We look forward to the original package supporting Python 3.\n\nProvides a fast, seamless in memory ip to country functionality based on the ip2nation db.\n\n- No dependencies\n- Completely free\n- Country resolution only\n- Queries / sec > 13.5k per core\n- Data file can be refreshed without a restart\n- Memory footprint < 40 MB\n- Command line\n- Stream / pipe ips and get comma delimited [ip,2 letter country code] e.g. 12.12.12.12,US\n\n```python\nfrom geoip import geoip\nr = geoip.GeoIp()\nr.load_memory()\nr.resolve(\"12.12.12.12\").country_code\n#This prints : 'US'\n\nprint r.resolve(\"123.44.57.4\")\n#This prints : {'country': 'Korea (South)', 'host_name': '', 'country_code': 'KR'}\n\nr.resolve2(\"133.12.12.12\")\n#This prints : 'JP'\n```\n\n# Command line\n\nusage: geoip.py [-h][-v] {download,resolve} ...\n\npositional arguments:\n{download,resolve}\n\noptional arguments:\n-h, --help show this help message and exit\n-v, --verbose increase output verbosity\n\nusage: geoip.py resolve [-h][-ho] [-s][--stream] ip\n\npositional arguments:\nip The ip address to get the country for\n\noptional arguments:\n-h, --help show this help message and exit\n-ho, --host When set to true the code will try to get the host name\n-s, --short When set to true the code will return a 2 letter country code\nonly\n--stream When set to true the code expect a stream of ips\n\nusage: geoip.py download [-h]\n\noptional arguments:\n-h, --help show this help message and exit\n\n# Installation\n\npip install geoip2nation\n\nPyPI: https://pypi.python.org/pypi/geoip2nation/\n\nGithub: https://github.com/avindak/python-geo-ip\n\n# ip2nation\n\n- Data can be downloaded using the download method\n\n- The load_memory method loads the ip2nation sql data file from disk into an in memory sqlite3 db\n\n# license\n\nMIT\n\n# Links\n\n- ip2nation home: http://ip2nation.com/\n- ip2nation data file: http://www.ip2nation.com/ip2nation.zip\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/pydanny/geoip2nation", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "geoip2nation3", "package_url": "https://pypi.org/project/geoip2nation3/", "platform": "", "project_url": "https://pypi.org/project/geoip2nation3/", "project_urls": { "Homepage": "https://github.com/pydanny/geoip2nation" }, "release_url": "https://pypi.org/project/geoip2nation3/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "Convert ip addresses to a country using ip2nation db in memory.", "version": "0.2.0" }, "last_serial": 4141118, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "86d5aefce23a4a48ce59ddf47c6d3a29", "sha256": "28641cdba416c733d4f0ffad51608640663f0f5bb087158065098f48e1939618" }, "downloads": -1, "filename": "geoip2nation3-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "86d5aefce23a4a48ce59ddf47c6d3a29", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 363939, "upload_time": "2018-08-06T16:52:31", "url": "https://files.pythonhosted.org/packages/cf/18/264f15db8aed60589cae2e8007c9b6b8df10f411bdb4fccf0b166c3fabc7/geoip2nation3-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "898ed81441a42c9932a31d5ca1348a01", "sha256": "797a7b9ab3885099b6794f7ebef8bc0f0901a2ecb9613c7108d23153005ab2c3" }, "downloads": -1, "filename": "geoip2nation3-0.2.0.tar.gz", "has_sig": false, "md5_digest": "898ed81441a42c9932a31d5ca1348a01", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 364501, "upload_time": "2018-08-06T16:52:40", "url": "https://files.pythonhosted.org/packages/ca/58/454e551f64a0f12d7028e417d483cee89c6067055550d10cdf9e9f54acf5/geoip2nation3-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "86d5aefce23a4a48ce59ddf47c6d3a29", "sha256": "28641cdba416c733d4f0ffad51608640663f0f5bb087158065098f48e1939618" }, "downloads": -1, "filename": "geoip2nation3-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "86d5aefce23a4a48ce59ddf47c6d3a29", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 363939, "upload_time": "2018-08-06T16:52:31", "url": "https://files.pythonhosted.org/packages/cf/18/264f15db8aed60589cae2e8007c9b6b8df10f411bdb4fccf0b166c3fabc7/geoip2nation3-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "898ed81441a42c9932a31d5ca1348a01", "sha256": "797a7b9ab3885099b6794f7ebef8bc0f0901a2ecb9613c7108d23153005ab2c3" }, "downloads": -1, "filename": "geoip2nation3-0.2.0.tar.gz", "has_sig": false, "md5_digest": "898ed81441a42c9932a31d5ca1348a01", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 364501, "upload_time": "2018-08-06T16:52:40", "url": "https://files.pythonhosted.org/packages/ca/58/454e551f64a0f12d7028e417d483cee89c6067055550d10cdf9e9f54acf5/geoip2nation3-0.2.0.tar.gz" } ] }