Skip to main content

maxminddb-polars

Fast Polars expressions for MaxMind DB lookups, implemented in Rust.

The Python API follows Semantic Versioning beginning with 0.1.0. The similarly named crates.io package is the native implementation used to build the Python plugin; it does not currently expose a supported Rust API.

The package provides nested whole-record lookups for recognized MaxMind DB schemas and selective path lookups for efficient enrichment. Callers supply their own licensed or GeoLite database; no database is bundled or downloaded.

Install it from PyPI with:

python -m pip install maxminddb-polars
from pathlib import Path

import polars as pl
import maxminddb_polars as mmp

database = Path("/data/GeoLite2-City.mmdb")
frame = pl.DataFrame({"ip": ["81.2.69.142", None]})

result = frame.select(
    country=mmp.lookup_path("ip", database, ("country", "iso_code")),
    city=mmp.lookup("ip", database),
)

# The expression namespace is equivalent:
country = pl.col("ip").mmdb.lookup_path(database, ("country", "iso_code"))

Whole records infer one of 14 standard schemas from database metadata: City, Country, Enterprise, ISP, Connection Type, Anonymous IP, Anonymous Plus, Residential Proxy, IP Risk, Static IP Score, User Count, Density/Income, Domain, or ASN. Their stable Polars dtypes are exported from maxminddb_polars.schemas.

Pass a nested mapping or pl.Struct as dtype for a partial known record or a custom database. See Custom and partial schemas.

Inputs must have String dtype. Null inputs, lookup misses, and missing paths produce null. Invalid IP strings raise by default; pass strict=False to turn them into nulls. The package caches generation-safe byte snapshots up to a documented process limit, so atomically replace database files and construct new expressions to refresh them.

Development

Initialize the fixtures and run the checks with:

git submodule update --init --recursive
uv sync --all-extras --locked
uv run maturin develop
uv run pytest
cargo test --locked

See CONTRIBUTING.md for the complete development workflow.

Documentation:

Project policies

Metadata

Release files for maxminddb-polars 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for maxminddb-polars 0.2.0
File Size Uploaded
maxminddb_polars-0.2.0.tar.gz 175.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for maxminddb-polars 0.2.0
File
maxminddb_polars-0.2.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
maxminddb_polars-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details
maxminddb_polars-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details
maxminddb_polars-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
maxminddb_polars-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
maxminddb_polars-0.2.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
maxminddb_polars-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 47.0 MB

Release files / maxminddb_polars-0.2.0.tar.gz

Download URL maxminddb_polars-0.2.0.tar.gz
Size 175.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d815be6b510370a5da18b65045ad3c12100ed78c94c355999f553cf76629e607
BLAKE2b-256 checksum
How to use checksums
e7670de42e3433cb6de4857cf40923b9cc8c157f15e07284dbaf70972f54f519
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release files / maxminddb_polars-0.2.0-cp310-abi3-win_amd64.whl

Download URL maxminddb_polars-0.2.0-cp310-abi3-win_amd64.whl
Size 6.3 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
2760efa74275e288a5c6be11dfaf52c2b6cfae76fa95861fda8be8901e39baf6
BLAKE2b-256 checksum
How to use checksums
a19ad3c0044b81d903b8b9219fef644b6abe9e3076e6f73c74e1728e3753d9fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release files / maxminddb_polars-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL maxminddb_polars-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl
Size 7.6 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
cb70e98e2155c4be94595879bc4c8f4bf0dad47a450389592c4befe4f6823595
BLAKE2b-256 checksum
How to use checksums
7e4945476edcb220f5eea18755285c52f8195e30b7fafcf9ae799e32b6e8d081
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release files / maxminddb_polars-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL maxminddb_polars-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl
Size 7.2 MB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
49ba77de71a6b22a99d99adf875309e1186d109c90d6b48455fcc384e7307fe1
BLAKE2b-256 checksum
How to use checksums
6d143397bf73b1a032982840ca8083007a7ff7a9789c3b9b887c3e8c533fe78e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release files / maxminddb_polars-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL maxminddb_polars-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 6.9 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
93df3bc52a5380539c295c79aab82c327c0f6e5e6a68a79f751f4b2cdd1b750c
BLAKE2b-256 checksum
How to use checksums
5d3eac69e857b63aa3f462bd0cfb50116d3f4e00dc7c449e361e0ba1cfabadc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release files / maxminddb_polars-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL maxminddb_polars-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 7.1 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
ccfaf5f7593d4ef1203119957d56b2ce870b398e0d4673beedcee745564ae58c
BLAKE2b-256 checksum
How to use checksums
90f4a91e427bf781e9fdabd0380f871be7b2fef4c3a7e88ccdb93bd77e5ecb08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release files / maxminddb_polars-0.2.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL maxminddb_polars-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
Size 5.7 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8f71449a397abe5ab83c481a6544af6c3e5526a9b7c3a67340f7047c2fb25c38
BLAKE2b-256 checksum
How to use checksums
a6b13bcb43f53e160c7d0f8e539a9dc265548f15ec2c68d5a772e134a8eb6403
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release files / maxminddb_polars-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL maxminddb_polars-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 6.0 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
ed208b65678dd7fae618ff927a1bcadafa965da54156ac4577486d6acb71ae6b
BLAKE2b-256 checksum
How to use checksums
b87b785cf2c2a6308c25f8486e7fa943494cf29ce0a56f7fa47b7dba3482bab2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

8 release files

0.1.3

8 release files

0.1.2

8 release files

0.1.1

8 release files

0.1.0

8 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page