{"id":7257,"library":"geoip2-tools","title":"geoip2-tools","description":"geoip2-tools provides command-line utilities for the automatic update and administration of MaxMind GeoIP2 databases. It simplifies the process of downloading and managing the GeoLite2 or GeoIP2 databases. The current version is 0.1.1, and the project appears to be in a stable state with a slow release cadence, primarily focusing on bug fixes.","status":"active","version":"0.1.1","language":"python","source_language":"en","source_url":"https://github.com/Nekmo/geoip2-tools/","tags":["MaxMind","GeoIP","CLI","database management","geolocation"],"install":[{"cmd":"pip install geoip2-tools","lang":"bash","label":"Install geoip2-tools"}],"dependencies":[{"reason":"Required for interacting with MaxMind GeoIP2 data formats and underlying API logic.","package":"geoip2"},{"reason":"Used for building the command-line interface (CLI).","package":"click"},{"reason":"Used for making HTTP requests to download GeoIP2 database updates from MaxMind.","package":"requests"}],"imports":[{"wrong":"from geoip2_tools import Manager","symbol":"Manager","correct":"from geoip2_tools import Manager"}],"quickstart":{"code":"# 1. Set your MaxMind account ID and license key as environment variables\n#    (Replace 'YOUR_ACCOUNT_ID' and 'YOUR_LICENSE_KEY' with your actual credentials)\nexport GEOIP2_ACCOUNT_ID=\"YOUR_ACCOUNT_ID\"\nexport GEOIP2_LICENSE_KEY=\"YOUR_LICENSE_KEY\"\n\n# 2. Run the update command to download/update databases\ngeoip2-tools update\n\n# 3. Check the status of your databases\ngeoip2-tools status","lang":"bash","description":"This quickstart demonstrates how to configure your MaxMind credentials via environment variables and then use the `geoip2-tools` CLI to update and check the status of your GeoIP2 databases. Ensure you replace the placeholder credentials with your own."},"warnings":[{"fix":"Use `pip install geoip2` and `from geoip2.database import Reader` for in-application lookups.","message":"This library is designed for *managing* GeoIP2 databases (downloading, updating). It is not for performing GeoIP lookups within Python code. For that, you should use the `geoip2` library directly (e.g., `from geoip2.database import Reader`).","severity":"gotcha","affected_versions":"All versions"},{"fix":"Before running `geoip2-tools update`, set environment variables: `export GEOIP2_ACCOUNT_ID='...'` and `export GEOIP2_LICENSE_KEY='...'`. Alternatively, configure them in a `geoip2-tools.yaml` file.","message":"To download or update GeoIP2 databases, you *must* provide your MaxMind Account ID and License Key. These can be set via `GEOIP2_ACCOUNT_ID` and `GEOIP2_LICENSE_KEY` environment variables, or through a configuration file.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Use the `--database-path` option with CLI commands or configure the `database_path` in `geoip2-tools.yaml` to specify a desired storage location.","message":"The default database download location might not be suitable for your production environment. Databases are typically stored in `/usr/local/share/GeoIP` (Linux) or a user's data directory. Consider configuring a custom path if needed.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'0.1.1':39 'administr':17 'appear':43 'automat':14 'bug':58 'cadenc':54 'cli':62 'command':9 'command-lin':8 'current':36 'databas':21,34,63 'download':27 'fix':59 'focus':56 'geoip':61 'geoip2':2,5,20,33 'geoip2-tools':1,4 'geolite2':31 'geoloc':65 'line':10 'manag':29,64 'maxmind':19,60 'primarili':55 'process':25 'project':42 'provid':7 'releas':53 'simplifi':23 'slow':52 'stabl':48 'state':49 'tool':3,6 'updat':15 'util':11 'version':37","created_at":"2026-04-16T13:50:29.786437+00:00","updated_at":"2026-04-16T13:50:29.786437+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'Manager' from 'geoip2_tools' (/tmp/tmprp9y30o0/venv/lib/python3.12/site-packages/geoip2_tools/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.1.1","cli_name":"geoip2-tools","cli_version":"Traceback (most recent call last):","type":"library","homepage":"https://www.maxmind.com/en/geoip2-services-and-databases","github":"https://github.com/Nekmo/geoip2-tools","docs":null,"changelog":null,"pypi":"https://pypi.org/project/geoip2-tools/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","http-networking"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}