preshed
Cython hash table that trusts the keys are pre-hashed
Install
preshed on PyPI
pip
pip install presheduv
uv add preshedpoetry
poetry add preshedPackage facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<3.15,>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 2 — cymem, murmurhash |
| Maintenance | actively maintained — 143 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: preshed-3.0.13-cp310-cp310-macosx_10_9_x86_64.whl; preshed-3.0.13-cp310-cp310-macosx_11_0_arm64.whl; preshed-3.0.13-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; preshed-3.0.13-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; preshed-3.0.13-cp310-cp310-musllinux_1_2_aarch64.whl; preshed-3.0.13-cp310-cp310-musllinux_1_2_x86_64.whl; preshed-3.0.13-cp310-cp310-win_amd64.whl; preshed-3.0.13-cp310-cp310-win_arm64.whl; preshed-3.0.13-cp311-cp311-macosx_10_9_x86_64.whl; preshed-3.0.13-cp311-cp311-macosx_11_0_arm64.whl; preshed-3.0.13-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; preshed-3.0.13-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl; preshed-3.0.13-cp311-cp311-musllinux_1_2_aarch64.whl; preshed-3.0.13-cp311-cp311-musllinux_1_2_x86_64.whl; preshed-3.0.13-cp311-cp311-win_amd64.whl; preshed-3.0.13-cp311-cp311-win_arm64.whl; preshed-3.0.13-cp312-cp312-macosx_10_13_x86_64.whl; preshed-3.0.13-cp312-cp312-macosx_11_0_arm64.whl; preshed-3.0.13-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl; preshed-3.0.13-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
About preshed
from the package's own PyPI description — quoted content, verbatim
<a href="https://explosion.ai"><img src="https://explosion.ai/assets/img/logo.svg" width="125" height="125" align="right" /></a>
preshed: Cython Hash Table for Pre-Hashed Keys
Simple but high performance Cython hash table mapping pre-randomized keys to
void* values. Inspired by
Jeff Preshing.
All Python APIs provded by the BloomFilter and PreshMap classes are
thread-safe on both the GIL-enabled build and the free-threaded build of Python
3.14 and newer. If you use the C API or the PreshCounter class, you must
provide external synchronization if you use the data structures by this library
in a multithreaded environment.
tests (image) pypi Version (image) conda Version (image) [![Python...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
preshed provides high-performance Cython hash tables and probabilistic data structures (PreshMap, BloomFilter, PreshCounter) for fast lookups and counting of pre-hashed integer keys, with thread-safe Python APIs and low-level C access.
Medium install friction due to compiled Cython wheels, but well-mitigated by extensive platform coverage (macOS, Linux, Windows; ARM and x86_64) across Python 3.10–3.14. Active maintenance with recent release (143 days ago) and no known vulnerabilities.
MIT license permits unrestricted commercial and private use, modification, and distribution with minimal restrictions—a permissive choice well-suited to library adoption.
Usage
pip install preshed
from preshed.maps import PreshMap
map = PreshMap()
map[key] = value
value = map[key]
Requires Python 3.9–3.14; pre-built wheels available for common platforms, but source build requires Cython and a C compiler.
Verdict: preshed is a mature, actively maintained library with no security issues, permissive licensing, and broad platform support. Medium install friction is offset by pre-built wheels and a stable maintenance track record. Suitable for production use in data-intensive applications requiring fast integer-key lookups.
Needs verification
- Whether cymem and murmurhash dependencies introduce additional install or runtime constraints beyond wheel distribution.
- Performance characteristics and memory overhead compared to standard alternatives in typical workloads.
Similar packages
permissive · top 1,000 on PyPI
pyroaringpermissive · top 1,000 on PyPI
lupapermissive · top 1,000 on PyPI
mergedeeppermissive · top 1,000 on PyPI
mmh3permissive · top 1,000 on PyPI
spacypermissive · top 1,000 on PyPI
blispermissive · top 1,000 on PyPI
weaselpermissive · top 1,000 on PyPI
thincpermissive · top 1,000 on PyPI
fastavropermissive · top 1,000 on PyPI