maxminddb
Reader for the MaxMind DB format
Decision gist · record as of 2026-08-14
Yes. The package is production-stable, actively maintained, has no known vulnerabilities, supports current Python versions (3.10+), and is widely used (top 5000 on PyPI). Install friction is manageable due to graceful fallback from C extension to pure Python. Use it if you need to query MaxMind DB files locally.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- You must obtain a MaxMind DB file (e.g., GeoLite2 databases) and decompress it with gunzip before use.
- Medium install friction due to optional C extension compilation, but the package gracefully falls back to pure Python if the build fails.
- Active maintenance with recent releases and no known vulnerabilities.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows use in commercial and open-source projects with minimal restrictions; attribution required.
last release 2026-03-05 (162 days) · last repo commit 2026-08-10 · 225 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 21,223,146 downloads/mo, #1,007 on PyPI
Alternatives
Verify before relying
pip install maxminddb
import maxminddb
with maxminddb.open_database('GeoLite2-City.mmdb') as reader:
result = reader.get('152.216.7.110')
print(result)- Performance characteristics and lookup speed compared to direct file I/O or other geolocation libraries.
- Memory footprint when loading large databases into memory via Mode.MEMORY.
What it is and what it does
maxminddb is a Python reader for the MaxMind DB binary format, a file format designed to store geolocation and other data indexed by IP address subnets. The package provides a Reader interface that accepts a MaxMind DB file path and returns lookup results for IPv4 or IPv6 addresses. It offers multiple read modes—including memory-mapped access, in-memory loading, and file-based reading—and includes an optional C extension for performance; if compilation fails, the module automatically falls back to a pure Python implementation.
Typical usage involves opening a database file (such as the free GeoLite2 databases from MaxMind), then calling get() or get_with_prefix_len() to retrieve data for a given IP address. The package also supports iteration over the entire database and is thread-safe for concurrent reads, including support for Python 3.13+ free-threading.
Use it for
- Determine the country, city, or ASN of an incoming request by looking up its IP address in a GeoLite2 database.
- Build IP-based access control or geofencing rules by querying MaxMind DB files in a web application.
- Analyze traffic logs or network data by batch-looking up IP addresses against a MaxMind database.
- Serve geolocation metadata to clients based on their IP, without external API calls.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is production-stable, actively maintained, has no known vulnerabilities, supports current Python versions (3.10+), and is widely used (top 5000 on PyPI). Install friction is manageable due to graceful fallback from C extension to pure Python. Use it if you need to query MaxMind DB files locally.
Install
maxminddb on PyPI
Before you install
Medium install friction due to optional C extension compilation, but the package gracefully falls back to pure Python if the build fails. Active maintenance with recent releases and no known vulnerabilities.
You must obtain a MaxMind DB file (e.g., GeoLite2 databases) and decompress it with gunzip before use.
License in practice
Apache-2.0 permissive license allows use in commercial and open-source projects with minimal restrictions; attribution required.
Quickstart
pip install maxminddb
import maxminddb
with maxminddb.open_database('GeoLite2-City.mmdb') as reader:
result = reader.get('152.216.7.110')
print(result)
Verify before relying
- Performance characteristics and lookup speed compared to direct file I/O or other geolocation libraries.
- Memory footprint when loading large databases into memory via Mode.MEMORY.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 162 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 21,223,146 / month, #1,007 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentIntended Audience :: DevelopersIntended Audience :: System AdministratorsProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: InternetTopic :: Internet :: Proxy Servers |
Evidence: maxminddb-3.1.1-cp310-cp310-macosx_10_9_universal2.whl; maxminddb-3.1.1-cp310-cp310-macosx_10_9_x86_64.whl; maxminddb-3.1.1-cp310-cp310-macosx_11_0_arm64.whl; maxminddb-3.1.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; maxminddb-3.1.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; maxminddb-3.1.1-cp310-cp310-musllinux_1_2_aarch64.whl; maxminddb-3.1.1-cp310-cp310-musllinux_1_2_x86_64.whl; maxminddb-3.1.1-cp310-cp310-win32.whl; maxminddb-3.1.1-cp310-cp310-win_amd64.whl; maxminddb-3.1.1-cp310-cp310-win_arm64.whl; maxminddb-3.1.1-cp311-cp311-macosx_10_9_universal2.whl; maxminddb-3.1.1-cp311-cp311-macosx_10_9_x86_64.whl; maxminddb-3.1.1-cp311-cp311-macosx_11_0_arm64.whl; maxminddb-3.1.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; maxminddb-3.1.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; maxminddb-3.1.1-cp311-cp311-musllinux_1_2_aarch64.whl; maxminddb-3.1.1-cp311-cp311-musllinux_1_2_x86_64.whl; maxminddb-3.1.1-cp311-cp311-win32.whl; maxminddb-3.1.1-cp311-cp311-win_amd64.whl; maxminddb-3.1.1-cp311-cp311-win_arm64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “MaxMind DB reader”
- maxminddbReads MaxMind DB files to look up geolocation and other data indexed…
- mmdb-writerGenerates MaxMind DB (MMDB) format files from IP networks and…
- geoip2Queries MaxMind's GeoIP web services and databases to look up…
Give your agent the search over MCP, or paste the wish link into any chat.
More Internet packages
Botocore provides low-level, data-driven access to Amazon Web Services APIs, serving as the foundation for the AWS CLI and boto3 libraries.
Install it if you need programmatic access to AWS services.
Provides an async client for AWS services using botocore and aiohttp, allowing you to call AWS APIs asynchronously within asyncio-based applications.
Install it if you need to call AWS services from async Python code; it is the standard way to do so.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides a platform-independent file locking mechanism to coordinate access to files across processes and threads.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides common Protocol Buffer message definitions used across Google Cloud APIs, enabling Python clients to interact with Google services.
See also maxminddb-geolite2 · mmdb-writer · geoip2fast · minfraud · geoip2 · geoip2-tools · IP2Location · types-maxminddb · ip3country · ipwhois