Skip to main content

maxminddb-polars

Look up IP addresses in MaxMind databases with Polars expressions, implemented in Rust. Read a single field with lookup_path or a record with lookup.

You supply the database. The package does not bundle or download one.

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"))

lookup detects the schema for 14 standard database families. Pass dtype to read only selected fields or use a custom database. See Custom and partial schemas.

The IP column must have String dtype. Null inputs, lookup misses, and missing paths return null. Invalid IP strings raise an error by default. Pass strict=False to turn them into nulls. Database and schema errors still raise.

To update a database, replace the file atomically and create new expressions. See Database updates for cache behavior and memory limits.

Development

Install the prerequisites in CONTRIBUTING.md and run:

git submodule update --init --recursive
scripts/check

Documentation:

Project policies

The Python API follows Semantic Versioning. The crates.io package is the native implementation of the Python plugin and has no supported Rust API.

Metadata

Release files for maxminddb-polars 0.4.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.4.0
File Size Uploaded Provenance Actions
maxminddb_polars-0.4.0.tar.gz 193.9 kB With provenance Details for maxminddb_polars-0.4.0.tar.gz

Built distributions (wheels)

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

Total release size: 47.2 MB

Release files / maxminddb_polars-0.4.0.tar.gz

Download URL maxminddb_polars-0.4.0.tar.gz
Size 193.9 kB
Tags Source
SHA-256 checksum
How to use checksums
fbd8bb7b5e45f064fab47da870794e42c38bafbcf5444baca8da644d17a54105
BLAKE2b-256 checksum
How to use checksums
742c4b533c884700f75963eb2e93cc45085056fa96eaa7116588838300a749d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

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

Download URL maxminddb_polars-0.4.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
908559f80c5398ab1f3e1fac75ccbe98fd710b848ee79b1fedcd6b3afc54ff6f
BLAKE2b-256 checksum
How to use checksums
a963c8643edb423cfe8eb1a7a1917e3020e8a02dff1139804cab6d71dfe72247
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

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

Download URL maxminddb_polars-0.4.0-cp310-abi3-musllinux_1_2_x86_64.whl
Size 7.7 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
9e88ea7091d4993e76508790c14e881b821f91ec3b4712e66f76a742a8331e95
BLAKE2b-256 checksum
How to use checksums
f93d7f23482321eae76ec5d4237a7b0fb05fa779220e0ac29df4a004b99319e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

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

Download URL maxminddb_polars-0.4.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
f8e60d63bf1ea6aa84a8a3aa78107dc8095bd09224bebe0ea7fefe1d24d9764b
BLAKE2b-256 checksum
How to use checksums
886e7d5ea5d36a7948d42c25278d6b0da463fc111d7f8d80cd55f0c8e77d7502
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

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

Download URL maxminddb_polars-0.4.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_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
6f6ccca88bef8c9c2022c6645ca063353adb0bd44bc4198ab90a5dc8fc8584c3
BLAKE2b-256 checksum
How to use checksums
81cc96f0948cbb3fe7686466a64b3dbc004d17aea30930564ad6f2256295ec52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

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

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

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 Nov 8, 2026.

Transparency log

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

Download URL maxminddb_polars-0.4.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
0227a965a8585d17a10403fa86c587ea9d71e5b0f5da3457d6085999f7c3b8bd
BLAKE2b-256 checksum
How to use checksums
33096799a7179b8aff5a2b1e9bc790382d877875a4cd1f16273ffe3c392891b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

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

Download URL maxminddb_polars-0.4.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
6007ca2da99db19114cc66d56b3dbb7acf9c7769de2995313783eb749ec7d2be
BLAKE2b-256 checksum
How to use checksums
5a3f669e2c852a16e3b05671372676f40418cc7f1608ece8c12208ec02c51f03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 8, 2026.

Transparency log

Security for maxminddb-polars 0.4.0

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.

Full provenance

All 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for maxminddb_polars-0.4.0.tar.gz

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 Nov 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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