trie-hard-py
trie-hard-py is a Python package backed by a Rust trie implementation. It is
useful when you need ordered key lookup, prefix search, longest-prefix matching,
and mutable map-style updates from Python.
The public module is trie_hard_py; the Rust extension is packaged as
trie_hard_py._native.
Features
- Exact lookup:
get,in,[] - Ordered iteration over
(key, value)pairs - Prefix search with deterministic lexicographic ordering
- Longest-prefix matching for autocomplete, gazetteers, dictionaries, and normalized entity lookup
- Bounded fuzzy matching by Unicode-aware Levenshtein distance
- Mutable operations:
insert,update,remove,discard,clear - UTF-8 safe keys; traversal is byte-based and keys are accepted as Python
str - Typed package metadata via
py.typedand__init__.pyi - Read-only frozen snapshots with bitmask child lookup inspired by
trie-hard
Install For Development
The project uses maturin and PyO3.
python3 -m venv venv
./venv/bin/python -m pip install -U pip
./venv/bin/python -m pip install -r python/requirements.txt pytest
VIRTUAL_ENV="$PWD/venv" ./venv/bin/maturin develop
./venv/bin/python -m pytest -q
Build A Wheel
./venv/bin/maturin build --release
./venv/bin/python -m pip install target/wheels/trie_hard_py-*.whl
Test And Benchmark
cargo test
VIRTUAL_ENV="$PWD/venv" ./venv/bin/maturin develop
./venv/bin/python -m pytest -q
./venv/bin/python benchmarks/bench_pytrie.py
The benchmark uses generated city, country, and medicine-style terms so prefix
and fuzzy matching resemble autocomplete and entity lookup workloads. It reports
rough RSS deltas for trie construction and writes local JSON history to
benchmarks/results/ for regression comparisons. RSS is process-level memory, so
treat it as a coarse regression signal rather than an exact object-size
measurement.
Usage
from trie_hard_py import PyTrie
trie = PyTrie(["san antonio", "san diego", "san jose", "serbia", "sertraline"])
assert trie.get("san diego") == "san diego"
assert "serbia" in trie
assert "ser" not in trie
trie.insert("amoxicillin tablet", "RXNORM:308182")
trie["amoxicillin oral suspension"] = "RXNORM:308189"
frozen = trie.freeze()
assert list(frozen.prefix_search("amoxicillin")) == [
("amoxicillin oral suspension", "RXNORM:308189"),
("amoxicillin tablet", "RXNORM:308182"),
]
assert frozen.longest_prefix("amoxicillin tablet 500mg") == (
"amoxicillin tablet",
"RXNORM:308182",
)
assert frozen.fuzzy_match("sertralina", max_distance=1) == ("sertraline", "sertraline", 1)
removed = trie.remove("amoxicillin tablet")
assert removed == "RXNORM:308182"
API
PyTrie(items: list[str] | None = None)
When constructed from strings, each key is stored with the same string as its value.
Main methods:
get(key) -> str | Noneget_or(key, default=None) -> str | Nonecontains(key) -> boolstarts_with(prefix) -> boolprefix_contains(prefix) -> boolinsert(key, value) -> str | Noneadd(key) -> str | Noneupdate(items: list[tuple[str, str]]) -> Noneremove(key) -> str | Nonediscard(key) -> boolclear() -> Nonekeys() -> list[str]values() -> list[str]items() -> list[tuple[str, str]]prefix_search(prefix) -> Iterator[tuple[str, str]]longest_prefix(query) -> tuple[str, str] | Nonefuzzy_search(query, max_distance=2, limit=10) -> list[tuple[str, str, int]]fuzzy_match(query, max_distance=2) -> tuple[str, str, int] | Nonefreeze() -> PyFrozenTrie
Python mapping helpers are also supported: len(trie), bool(trie),
key in trie, trie[key], trie[key] = value, del trie[key], and iteration
over (key, value) pairs.
PyFrozenTrie is a read-only snapshot returned by PyTrie.freeze(). It supports
the read APIs (get, contains, prefix_search, longest_prefix,
fuzzy_search, iteration, and mapping-style reads) but does not expose mutation.
Engineering Notes
The core is currently a mutable byte trie implemented in Rust with arena-stored
nodes and sorted compact child lists. Values are stored as shared Arc<str>
handles, so frozen snapshots can reuse value strings instead of copying them.
This keeps iteration deterministic without allocating a map object per node.
Deleted branches are detached from their parents; arena slots are retained so
existing node indexes stay stable.
Frozen snapshots path-compress unary chains into radix labels before applying
adaptive child lookup. Nodes with high fanout get an external 256-bit child
mask, so exact lookup checks whether the queried byte is present and computes
the child offset with count_ones, following the same rank-by-bitmask idea used
by Cloudflare's trie-hard. Low-fanout nodes avoid the fixed mask cost and use
binary search over contiguous children instead. Benchmark both mutable and
frozen forms for your workload.
The current frozen node layout intentionally keeps per-node metadata together. An experimental structure-of-arrays layout was tested, but on the benchmark dataset it used more RSS than the adaptive node layout, so it is not used.
It intentionally does not depend on Cloudflare's trie-hard crate because that
crate is optimized for bulk-loaded read-mostly maps; this package exposes
mutable Python operations.
Fuzzy search uses bounded Levenshtein distance and short-circuits candidates
that already exceed max_distance. Distances are counted over Unicode scalar
values rather than UTF-8 bytes.
CI builds and tests the extension on Linux, macOS, and Windows using GitHub Actions and uploads wheel artifacts for each platform.
Metadata
Release files for trie-hard-py 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| trie_hard_py-0.1.0.tar.gz | 19.0 kB | With provenance | Details for trie_hard_py-0.1.0.tar.gz |
Built distributions (wheels)
Total release size: 3.8 MB
Release files / trie_hard_py-0.1.0.tar.gz
| Download URL | trie_hard_py-0.1.0.tar.gz |
|---|---|
| Size | 19.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2688111f58b3d55e111f9fd98f5ec1fa45e79645445d9994e0fe0fdaa60ac711
|
|
BLAKE2b-256 checksum How to use checksums |
e8c6a28585a4feaf96e75160093a62944a74511251a5156cabb18f53e8fdfe26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 2, 2026.
Transparency logRelease files / trie_hard_py-0.1.0-cp313-cp313-win_amd64.whl
| Download URL | trie_hard_py-0.1.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 169.4 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4636a950191a1ead876ec8bb26ea1d1e9c1659ba429044610c85266f1a8d7e84
|
|
BLAKE2b-256 checksum How to use checksums |
59f2db17d7fd3d4c3cd05eb58226cb66c106180191d83c5c3c2b81fac8e19a34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 2, 2026.
Transparency logRelease files / trie_hard_py-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | trie_hard_py-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 310.0 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
4813b031aa41b76a14ca0a0fb36d37b4c84f7f4259cf1addab02f53f713a2235
|
|
BLAKE2b-256 checksum How to use checksums |
0a84c5c659157641a58438e1c12a9a8e55bbd98f01a5638c8919e0f10310ed6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 2, 2026.
Transparency logRelease files / trie_hard_py-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | trie_hard_py-0.1.0-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 273.6 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5e18f9cdc4e9d5364574685d15db0a8eaed01538a0420918187cd8726efeb9ce
|
|
BLAKE2b-256 checksum How to use checksums |
ecebd024b355df84c6e01a54ba84fdbf4ee9a706a4cb2766c9711801ba60e03b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 2, 2026.
Transparency logRelease files / trie_hard_py-0.1.0-cp312-cp312-win_amd64.whl
| Download URL | trie_hard_py-0.1.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 169.3 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
88530d5507b4fe9fca5411923c6e3b775dd036ff9abb66e0f8ee9aabf7ffa87d
|
|
BLAKE2b-256 checksum How to use checksums |
5c2faa7bb87d7ad58f729c1c034ba86326f49aec657c6b16384cb4c7855c900f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 2, 2026.
Transparency logRelease files / trie_hard_py-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | trie_hard_py-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 311.3 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
5ec98bf8e0ea0643bb32e4a84be67837eb2775223429d4389eaaaf4639fc9cb3
|
|
BLAKE2b-256 checksum How to use checksums |
4f320fa9ed332dfabbe85584c4464b90f458e75bd06faba295110c113db4aa94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 2, 2026.
Transparency logRelease files / trie_hard_py-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | trie_hard_py-0.1.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 273.7 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1de4a9c7362ddccf438f229d334e5e6c6360040124c24fdcaffb65adea53f030
|
|
BLAKE2b-256 checksum How to use checksums |
528ed0d8832148804439c43ce892e6aab26f8adff7a927f3afaf0acb2911c705
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 2, 2026.
Transparency logRelease files / trie_hard_py-0.1.0-cp311-cp311-win_amd64.whl
| Download URL | trie_hard_py-0.1.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 170.8 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d3fd2309698064658af315934ecb6806bd168e12608897235ff2fd470f4b027a
|
|
BLAKE2b-256 checksum How to use checksums |
6237d40bff897b1532ab05e9299a8581a7a227bad011c678132a02639cf2a5c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 2, 2026.
Transparency logRelease files / trie_hard_py-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | trie_hard_py-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 312.9 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
9183427abe0a5911698863a109b561351a3c967cbf43cbd7809abb7b8dfe9537
|
|
BLAKE2b-256 checksum How to use checksums |
167f42d970bbfc811ce647fbe9a38eb379ceb04029c4b65167dfb041e4c8ff4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 2, 2026.
Transparency logRelease files / trie_hard_py-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | trie_hard_py-0.1.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 275.0 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
79092464ee599099c316384c403bbc4392ad689538796bd729313f014691e786
|
|
BLAKE2b-256 checksum How to use checksums |
dce5cd4df1410973386ccd86970a296cd28affeb13a17551aec2b2810ddb3d34
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 2, 2026.
Transparency logRelease files / trie_hard_py-0.1.0-cp310-cp310-win_amd64.whl
| Download URL | trie_hard_py-0.1.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 170.8 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4290f5a8e4c85c92a5af682277bc0434dc9157b01a930906bc7b6d707cf2ed51
|
|
BLAKE2b-256 checksum How to use checksums |
4c855e67438a367fc62c3688ad62376876d27a4ca99638a13bc28d507324d3c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 2, 2026.
Transparency logRelease files / trie_hard_py-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | trie_hard_py-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 313.3 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
ab98f6aa6caffa9a0750de126bce4c4bebf43607afe950bd539d0e00a7bc7760
|
|
BLAKE2b-256 checksum How to use checksums |
e2a17156a7846299ccd942a24f7fda0d6ad6a04fee30d9b574b96232c97e3408
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 2, 2026.
Transparency logRelease files / trie_hard_py-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | trie_hard_py-0.1.0-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 275.1 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
99c9aa5fadd71231c8f153dfe2d532457a5fca9c80e406e13aa9bcf6ed78aa2e
|
|
BLAKE2b-256 checksum How to use checksums |
429cec7e61abdb32759cee9a2e55f279a8ea5effdb5c547edbfea12317282fba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 2, 2026.
Transparency logRelease files / trie_hard_py-0.1.0-cp39-cp39-win_amd64.whl
| Download URL | trie_hard_py-0.1.0-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 173.3 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b196a8aa5c35a1efe611d2ad6bbce78ca39da69e74e11e6666ad8807062d83bb
|
|
BLAKE2b-256 checksum How to use checksums |
8cb82b6bf38b87c8ad91339821a990d8efceddb7adae5d479c10485bfab53ff5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 2, 2026.
Transparency logRelease files / trie_hard_py-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | trie_hard_py-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 316.0 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
e294a712b1ce0c815c5e838ab34895637f0c6737d4bcb49b1a1d0a9d006a8722
|
|
BLAKE2b-256 checksum How to use checksums |
ffe2937bbfe089acaf9916f0c6814dd965b1bbdfc25657c8e3863b8c06d1c49d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 2, 2026.
Transparency logRelease files / trie_hard_py-0.1.0-cp39-cp39-macosx_11_0_arm64.whl
| Download URL | trie_hard_py-0.1.0-cp39-cp39-macosx_11_0_arm64.whl |
|---|---|
| Size | 277.4 kB |
| Tags | CPython 3.9 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8f751c2ba5ae235122f56659c2053607520ccdc08f6a9e5acd5a57d9c8aa64f5
|
|
BLAKE2b-256 checksum How to use checksums |
41534cb2ec64ef76e479cfc1ae919ebe6484b04c78bade3774bb61591d543b07
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 2, 2026.
Transparency logSecurity for trie-hard-py 0.1.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 16 files in this release have been uploaded with provenance metadata.
Attestation for trie_hard_py-0.1.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 May 2, 2026.
Transparency logA 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.