fnv-hash-fast
A fast version of fnv1a
What it is and what it does
fnv-hash-fast is a Python library that computes FNV-1a 32-bit hashes on byte strings. It attempts to use a compiled C++ implementation for speed when Cython is available, and falls back to a pure Python implementation from the fnvhash package otherwise. The library exports a single primary function, fnv1a_32, which takes bytes as input and returns an integer hash value.
The package targets developers who need fast, non-cryptographic hashing—for example, in hash tables, bloom filters, or data deduplication. It supports Python 3.10 through 3.14 and is distributed as pre-compiled wheels for common platforms (Linux, macOS, Windows) and architectures (x86_64, ARM), reducing installation friction on most systems.
Use it for:
- Hash table or dictionary key generation where speed matters more than cryptographic strength.
- Bloom filter construction for fast membership testing in large datasets.
- Data deduplication or fingerprinting in file systems or caching layers.
- Network packet or message identification in protocols that use FNV hashing.
- Distributed system node selection or consistent hashing without cryptographic requirements.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Computes FNV-1a 32-bit hashes using a C++ implementation when available, falling back to pure Python via fnvhash.
Yes, if you need a fast FNV-1a implementation and accept that this is a non-cryptographic hash. The package is actively maintained, has no known vulnerabilities, supports modern Python versions, and offers both compiled and pure-Python paths. Install it for performance-sensitive hashing tasks where FNV-1a is already your algorithm of choice; do not use it as a general-purpose cryptographic hash.
Install
fnv-hash-fast on PyPI
pip
pip install fnv-hash-fastuv
uv add fnv-hash-fastpoetry
poetry add fnv-hash-fastInstalling fnv-hash-fast
Before you install
Medium install friction due to compiled wheels for multiple platforms and Python versions (3.10–3.14). Active maintenance with a recent release in May 2026 and a commit as of August 2026 suggests ongoing support.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for commercial and open-source projects alike.
Quickstart
pip install fnv-hash-fast
import fnv_hash_fast
result = fnv_hash_fast.fnv1a_32(b"hello")
print(result) # 1335831723
Requires Python 3.10 or later. C++ implementation requires Cython; pure Python fallback from fnvhash is used if unavailable.
Verify before relying
- Whether the C++ implementation provides measurable performance gains over the pure Python fallback in typical workloads.
- Collision rate or cryptographic properties of the FNV-1a implementation compared to other hash functions.
- Whether this package is suitable for security-critical applications or only for non-cryptographic hashing.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — fnvhash |
| Maintenance | actively maintained — 90 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 781,477/month — #5,079 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fnv_hash_fast-2.0.3-cp311-cp311-macosx_11_0_arm64.whl; fnv_hash_fast-2.0.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; fnv_hash_fast-2.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; fnv_hash_fast-2.0.3-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl; fnv_hash_fast-2.0.3-cp311-cp311-musllinux_1_2_aarch64.whl; fnv_hash_fast-2.0.3-cp311-cp311-musllinux_1_2_armv7l.whl; fnv_hash_fast-2.0.3-cp311-cp311-musllinux_1_2_x86_64.whl; fnv_hash_fast-2.0.3-cp311-cp311-win32.whl; fnv_hash_fast-2.0.3-cp311-cp311-win_amd64.whl; fnv_hash_fast-2.0.3-cp312-cp312-macosx_11_0_arm64.whl; fnv_hash_fast-2.0.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; fnv_hash_fast-2.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; fnv_hash_fast-2.0.3-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl; fnv_hash_fast-2.0.3-cp312-cp312-musllinux_1_2_aarch64.whl; fnv_hash_fast-2.0.3-cp312-cp312-musllinux_1_2_armv7l.whl; fnv_hash_fast-2.0.3-cp312-cp312-musllinux_1_2_x86_64.whl; fnv_hash_fast-2.0.3-cp312-cp312-win32.whl; fnv_hash_fast-2.0.3-cp312-cp312-win_amd64.whl; fnv_hash_fast-2.0.3-cp313-cp313-macosx_11_0_arm64.whl; fnv_hash_fast-2.0.3-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
fnvhashComputes FNV hash values in pure Python,…
permissive · top 5,000 on PyPI
kasa-cryptProvides fast encryption and decryption…
permissive · top 15,000 on PyPI
siphashcsiphashc provides a Python binding to the…
permissive · top 15,000 on PyPI
murmurhashProvides fast MurmurHash2 hashing through…
permissive · top 1,000 on PyPI
xxhashxxhash provides fast non-cryptographic hashing…
permissive · top 1,000 on PyPI
murmurhash2Provides 32-bit murmurhash2 and murmurhash3…
permissive · top 5,000 on PyPI
mmhash3mmhash3 is a Python wrapper for MurmurHash3,…
permissive · top 15,000 on PyPI
siphashProvides a Python implementation of SipHash, a…
permissive · top 15,000 on PyPI
mmh3mmh3 is a Python binding to MurmurHash3, a fast…
permissive · top 1,000 on PyPI
cityhashPython wrapper for Google's CityHash and…
permissive · top 15,000 on PyPI