skillfed

fnv-hash-fast

A fast version of fnv1a

fnv-hash-fast v2.0.3 781.5K downloads/30d#5,079 on PyPI6
Permissive license MIT Active released

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-fast

uv

uv add fnv-hash-fast

poetry

poetry add fnv-hash-fast

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries

Tags

fnv hash implementationfnv1a 32-bit hashingfast hash functionfnv hash pythonhash algorithm librarycryptographic hashingdata fingerprinting
hashingfnvperformance

More Libraries packages