geoip2-tools

0.1.1 · active · verified Thu Apr 16

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.

Common errors

Warnings

Install

Imports

Quickstart

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.

# 1. Set your MaxMind account ID and license key as environment variables
#    (Replace 'YOUR_ACCOUNT_ID' and 'YOUR_LICENSE_KEY' with your actual credentials)
export GEOIP2_ACCOUNT_ID="YOUR_ACCOUNT_ID"
export GEOIP2_LICENSE_KEY="YOUR_LICENSE_KEY"

# 2. Run the update command to download/update databases
geoip2-tools update

# 3. Check the status of your databases
geoip2-tools status

view raw JSON →