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:
- API and supported databases
- Custom and partial schemas
- Installation and compatibility
- Performance and benchmarks
- Competitor comparison
- Security testing
- 0.1 release record
Project policies
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file maxminddb_polars-0.1.3.tar.gz.
File metadata
- Download URL: maxminddb_polars-0.1.3.tar.gz
- Upload date:
- Size: 174.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55e6a09a4aefe7ea1f87cc92c5ffaa094e7adec5458fd8c70e4af1f0079f3d26
|
|
| MD5 |
e5e28abfabd3dec874fd3cfd6ca4bd4a
|
|
| BLAKE2b-256 |
f8dc39f8f52f81bac1d2c771a001ae23c87e2a2dc1e06bfb64b0e9d75795aa3f
|
Provenance
The following attestation bundles were made for maxminddb_polars-0.1.3.tar.gz:
Publisher:
release.yml on oschwald/maxminddb-polars
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maxminddb_polars-0.1.3.tar.gz -
Subject digest:
55e6a09a4aefe7ea1f87cc92c5ffaa094e7adec5458fd8c70e4af1f0079f3d26 - Sigstore transparency entry: 2603401339
- Sigstore integration time:
-
Permalink:
oschwald/maxminddb-polars@4a9b73fb0bec6044a9cf4c2692ea7904c6d81e98 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/oschwald
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4a9b73fb0bec6044a9cf4c2692ea7904c6d81e98 -
Trigger Event:
release
-
Statement type:
File details
Details for the file maxminddb_polars-0.1.3-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: maxminddb_polars-0.1.3-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 6.6 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd93b4170b9af9807bb220eecc8c5ace48a10b2948a1e1c70ddf1e4297d76659
|
|
| MD5 |
dd4e9979b00f12320a80bbb45aa0cd62
|
|
| BLAKE2b-256 |
2879a28a0b9a3e29ad06dbcf0f03cdba45fadad2d3ea5fb276e53f96a88fa73d
|
Provenance
The following attestation bundles were made for maxminddb_polars-0.1.3-cp310-abi3-win_amd64.whl:
Publisher:
release.yml on oschwald/maxminddb-polars
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maxminddb_polars-0.1.3-cp310-abi3-win_amd64.whl -
Subject digest:
dd93b4170b9af9807bb220eecc8c5ace48a10b2948a1e1c70ddf1e4297d76659 - Sigstore transparency entry: 2603404698
- Sigstore integration time:
-
Permalink:
oschwald/maxminddb-polars@4a9b73fb0bec6044a9cf4c2692ea7904c6d81e98 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/oschwald
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4a9b73fb0bec6044a9cf4c2692ea7904c6d81e98 -
Trigger Event:
release
-
Statement type:
File details
Details for the file maxminddb_polars-0.1.3-cp310-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: maxminddb_polars-0.1.3-cp310-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 7.3 MB
- Tags: CPython 3.10+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d74dd86185339e09f956d4a03fae484bd3c01c63d25e4113557b09817824c6f
|
|
| MD5 |
9b9af7f05df165ad4b8c2c0363730564
|
|
| BLAKE2b-256 |
05dcbdf73b6d3ac7fb3eba4cb67670f4a37fbd2fc86e397d8970f5949eac712f
|
Provenance
The following attestation bundles were made for maxminddb_polars-0.1.3-cp310-abi3-musllinux_1_2_x86_64.whl:
Publisher:
release.yml on oschwald/maxminddb-polars
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maxminddb_polars-0.1.3-cp310-abi3-musllinux_1_2_x86_64.whl -
Subject digest:
4d74dd86185339e09f956d4a03fae484bd3c01c63d25e4113557b09817824c6f - Sigstore transparency entry: 2603404527
- Sigstore integration time:
-
Permalink:
oschwald/maxminddb-polars@4a9b73fb0bec6044a9cf4c2692ea7904c6d81e98 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/oschwald
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4a9b73fb0bec6044a9cf4c2692ea7904c6d81e98 -
Trigger Event:
release
-
Statement type:
File details
Details for the file maxminddb_polars-0.1.3-cp310-abi3-musllinux_1_2_aarch64.whl.
File metadata
- Download URL: maxminddb_polars-0.1.3-cp310-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 6.9 MB
- Tags: CPython 3.10+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb20dbdb9b1d2708f131080719cc50bed085215b11851e538d9ec351c151cff2
|
|
| MD5 |
a25ca5cdc98b2bc92f367ce866588f72
|
|
| BLAKE2b-256 |
12b2076a60682832f44897e986d7cfc8ef189612fa073ccdb38c1d0d63bd6919
|
Provenance
The following attestation bundles were made for maxminddb_polars-0.1.3-cp310-abi3-musllinux_1_2_aarch64.whl:
Publisher:
release.yml on oschwald/maxminddb-polars
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maxminddb_polars-0.1.3-cp310-abi3-musllinux_1_2_aarch64.whl -
Subject digest:
cb20dbdb9b1d2708f131080719cc50bed085215b11851e538d9ec351c151cff2 - Sigstore transparency entry: 2603403516
- Sigstore integration time:
-
Permalink:
oschwald/maxminddb-polars@4a9b73fb0bec6044a9cf4c2692ea7904c6d81e98 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/oschwald
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4a9b73fb0bec6044a9cf4c2692ea7904c6d81e98 -
Trigger Event:
release
-
Statement type:
File details
Details for the file maxminddb_polars-0.1.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: maxminddb_polars-0.1.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 7.3 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
882a7c1b115b62a3fa168b7d1ea661603021edecf415e7b30bdba642be276ba8
|
|
| MD5 |
04a7b3a3ff4f74c178fb2069a4134a0c
|
|
| BLAKE2b-256 |
758cca76227027a30de4d7ee755096a2e8e2e34403795e0924769d9ce2817a65
|
Provenance
The following attestation bundles were made for maxminddb_polars-0.1.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on oschwald/maxminddb-polars
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maxminddb_polars-0.1.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
882a7c1b115b62a3fa168b7d1ea661603021edecf415e7b30bdba642be276ba8 - Sigstore transparency entry: 2603405153
- Sigstore integration time:
-
Permalink:
oschwald/maxminddb-polars@4a9b73fb0bec6044a9cf4c2692ea7904c6d81e98 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/oschwald
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4a9b73fb0bec6044a9cf4c2692ea7904c6d81e98 -
Trigger Event:
release
-
Statement type:
File details
Details for the file maxminddb_polars-0.1.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: maxminddb_polars-0.1.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 6.7 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57112ea0a063712c7fb60577173406bdfc1e5f73849d600a62f1185f9727d3cc
|
|
| MD5 |
340cb28dd69b585248f94ebbeea3d298
|
|
| BLAKE2b-256 |
c0316c3c1b1c3256c04817d073a3876a0fd2c549bea78d7932b7fbf341bccc82
|
Provenance
The following attestation bundles were made for maxminddb_polars-0.1.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on oschwald/maxminddb-polars
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maxminddb_polars-0.1.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
57112ea0a063712c7fb60577173406bdfc1e5f73849d600a62f1185f9727d3cc - Sigstore transparency entry: 2603404200
- Sigstore integration time:
-
Permalink:
oschwald/maxminddb-polars@4a9b73fb0bec6044a9cf4c2692ea7904c6d81e98 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/oschwald
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4a9b73fb0bec6044a9cf4c2692ea7904c6d81e98 -
Trigger Event:
release
-
Statement type:
File details
Details for the file maxminddb_polars-0.1.3-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: maxminddb_polars-0.1.3-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 6.1 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d58c61dbeb93d9647749543b5dac1efaee1277281e2a11901d6cfd4751ee530
|
|
| MD5 |
013690073523eff016be51c91d7cd0c6
|
|
| BLAKE2b-256 |
a66d812eb921fee7be011772913f6baf01a9661d4f4e12311f6e4b99d5a509af
|
Provenance
The following attestation bundles were made for maxminddb_polars-0.1.3-cp310-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on oschwald/maxminddb-polars
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maxminddb_polars-0.1.3-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
2d58c61dbeb93d9647749543b5dac1efaee1277281e2a11901d6cfd4751ee530 - Sigstore transparency entry: 2603402892
- Sigstore integration time:
-
Permalink:
oschwald/maxminddb-polars@4a9b73fb0bec6044a9cf4c2692ea7904c6d81e98 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/oschwald
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4a9b73fb0bec6044a9cf4c2692ea7904c6d81e98 -
Trigger Event:
release
-
Statement type:
File details
Details for the file maxminddb_polars-0.1.3-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: maxminddb_polars-0.1.3-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 6.6 MB
- Tags: CPython 3.10+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b74553e2de45a027ce87c3eab988fc85967f77866f4210ce42b4b9458306c6e2
|
|
| MD5 |
c74cba6a4cfd8c08fcc71ed82af2b55a
|
|
| BLAKE2b-256 |
0e280281eee8b7960f90dd152f5a916226a7e73ba3339ade43a8855b78f65bb3
|
Provenance
The following attestation bundles were made for maxminddb_polars-0.1.3-cp310-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on oschwald/maxminddb-polars
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maxminddb_polars-0.1.3-cp310-abi3-macosx_10_12_x86_64.whl -
Subject digest:
b74553e2de45a027ce87c3eab988fc85967f77866f4210ce42b4b9458306c6e2 - Sigstore transparency entry: 2603402028
- Sigstore integration time:
-
Permalink:
oschwald/maxminddb-polars@4a9b73fb0bec6044a9cf4c2692ea7904c6d81e98 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/oschwald
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4a9b73fb0bec6044a9cf4c2692ea7904c6d81e98 -
Trigger Event:
release
-
Statement type: