{"id":21740876,"url":"https://github.com/whois-api-llc/python-simple-geoip","last_synced_at":"2025-07-26T16:08:21.777Z","repository":{"id":57467430,"uuid":"130961046","full_name":"whois-api-llc/python-simple-geoip","owner":"whois-api-llc","description":"The simplest possible way to get IP geolocation information.","archived":false,"fork":false,"pushed_at":"2022-09-21T08:00:36.000Z","size":18,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-18T17:53:39.908Z","etag":null,"topics":["flask","geolocation","geolocation-api","ip-geolocation","python","whoisxmlapi"],"latest_commit_sha":null,"homepage":"https://ip-geolocation.whoisxmlapi.com/api","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/whois-api-llc.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-25T06:31:40.000Z","updated_at":"2025-02-19T10:21:13.000Z","dependencies_parsed_at":"2022-09-17T16:20:14.874Z","dependency_job_id":null,"html_url":"https://github.com/whois-api-llc/python-simple-geoip","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/whois-api-llc/python-simple-geoip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fpython-simple-geoip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fpython-simple-geoip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fpython-simple-geoip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fpython-simple-geoip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whois-api-llc","download_url":"https://codeload.github.com/whois-api-llc/python-simple-geoip/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whois-api-llc%2Fpython-simple-geoip/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266095431,"owners_count":23875866,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","geolocation","geolocation-api","ip-geolocation","python","whoisxmlapi"],"created_at":"2024-11-26T06:15:45.059Z","updated_at":"2025-07-26T16:08:21.754Z","avatar_url":"https://github.com/whois-api-llc.png","language":"Python","readme":"python-simple-geoip\n===================\n\nThe simplest possible way to get IP geolocation information in Python.\n\n.. image:: https://raw.githubusercontent.com/whois-api-llc/python-simple-geoip/master/images/geoip.png\n\n.. image:: https://img.shields.io/pypi/v/simple-geoip.svg\n    :alt: python-simple-geoip Release\n    :target: https://pypi.python.org/pypi/simple-geoip\n\n.. image:: https://img.shields.io/travis/whois-api-llc/python-simple-geoip.svg\n    :alt: python-simple-geoip Build\n    :target: https://travis-ci.org/whois-api-llc/python-simple-geoip\n\n\nMeta\n----\n\n- Author: Randall Degges\n- Email: r@rdegges.com\n- Twitter: https://twitter.com/rdegges\n- Site: http://www.rdegges.com\n- Status: production ready\n\n\nPrerequisites\n-------------\n\nTo use this library, you'll need to create a free IP Geolocation account:\nhttps://ip-geolocation.whoisxmlapi.com/\n\nIf you haven't done this yet, please do so now.\n\n\nInstallation\n------------\n\nTo install ``simple-geoip`` using `pypi \u003chttps://pypi.org/\u003e`_, simply run:\n\n.. code-block:: console\n\n    $ pip install simple-geoip\n\nIn the root of your project directory.\n\n\nUsage\n-----\n\nOnce you have `simple-geoip` installed, you can use it to easily find the\nphysical location of a given IP address.\n\nThis library gives you access to all sorts of geographical location data that\nyou can use in your application in any number of ways.\n\n.. code-block:: python\n\n    from simple_geoip import GeoIP\n\n    ip = GeoIP(\"your-api-key\");\n\n    try:\n        data = ip.lookup(\"8.8.8.8\")\n    except ConnectionError:\n        # If you get here, it means you were unable to reach the IP Geolocation\n        # service, most likely because of a network error on your end.\n    except ServiceError:\n        # If you get here, it means IP Geolocation is having issues, so the request\n        # couldn't be completed :(\n    except:\n        # Something else happened (non-IP Geolocation) related. Maybe you hit CTRL-C\n        # while the program was running, the kernel is killing your process, or\n        # something else all together.\n\n    print(data)\n\nHere's the sort of data you might get back when performing a IP Geolocation lookup\nrequest:\n\n.. code-block:: json\n\n    {\n      \"ip\": \"8.8.8.8\",\n      \"location\": {\n        \"country\": \"US\",\n        \"region\": \"California\",\n        \"city\": \"Mountain View\",\n        \"lat\": 37.40599,\n        \"lng\": -122.078514,\n        \"postalCode\": \"94043\",\n        \"timezone\": \"-08:00\"\n      }\n    }\n\nBy default, this library handles retrying failed HTTP requests for you. For\ninstance: if the IP Geolocation API service is currently down or having issues,\nyour request will be retried up to three consecutive times before failing.\n\n\nChangelog\n---------\n\nAll library changes in descending order.\n\nVersion 0.1.1\n*************\n\n**August 4, 2020**\n\nWhoisXML API Tech Support has fixed issues due to obsolete\ncommands. It is now Python 3.8 compatible, and has been also tested\nwith Python 3.6 and 2.7.\n\n\nVersion 0.1.0\n*************\n\n**Released April 26, 2018.**\n\n- First release!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhois-api-llc%2Fpython-simple-geoip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhois-api-llc%2Fpython-simple-geoip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhois-api-llc%2Fpython-simple-geoip/lists"}