spookyhash
A Python wrapper for SpookyHash version 2
What it is and what it does
spookyhash is a Python wrapper around Bob Jenkins' SpookyHash algorithm, a non-cryptographic hash function optimized for speed. It exposes three hash output sizes (32, 64, and 128 bits) and supports both one-shot hashing and incremental updates via stateful Hash objects. The library also handles memoryview-compatible types, making it convenient for NumPy arrays and other buffer-protocol objects.
The package targets use cases where you need fast, non-cryptographic hashing—such as hash tables, checksums, or data deduplication—rather than security-sensitive applications. It has no runtime dependencies and provides pre-built wheels for modern Python versions (3.7–3.14) across major platforms, though the project is aging with its last release 278 days ago.
Use it for:
- Hash table or dictionary implementation where speed matters more than cryptographic security
- Deduplication of large datasets by computing fast checksums on data chunks or NumPy arrays
- Incremental hashing of streaming data or file chunks without loading entire content into memory
- Fast content-based addressing in caching systems or distributed storage
- Bloom filters or probabilistic data structures that require non-cryptographic hashing
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides fast 32-, 64-, and 128-bit hashing via Bob Jenkins' SpookyHash algorithm, with both one-shot and incremental hash modes and support for memoryview-compatible types like NumPy arrays.
Yes, if you need a fast non-cryptographic hash function for performance-critical applications like deduplication, caching, or hash tables. The MIT license is permissive, install friction is manageable with pre-built wheels, no vulnerabilities are known, and the API is straightforward. No if you require cryptographic security or active maintenance—the project is aging and has not been updated in 278 days.
Install
spookyhash on PyPI
pip
pip install spookyhashuv
uv add spookyhashpoetry
poetry add spookyhashInstalling spookyhash
Before you install
Medium install friction due to compiled wheels; pre-built binaries available for Python 3.7–3.14 across macOS, Linux, Windows, and ARM platforms. Last release 278 days ago; repository active but aging.
License in practice
MIT license is permissive; you may use, modify, and distribute this package freely with minimal restrictions.
Quickstart
pip install spookyhash
import spookyhash
# One-shot hash
result = spookyhash.hash64(b'hello world')
print(result) # 14865987102431973981
# Incremental hash
sh = spookyhash.Hash64()
sh.update(b'hello')
sh.update(b' world')
print(sh.hexdigest()) # 5d12ff9b81984ece
Verify before relying
- Whether SpookyHash collisions are acceptable for your use case compared to cryptographic hashes
- Performance benchmarks against Python's built-in hashlib for your typical data sizes
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | aging — 278 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 102,745/month — #12,852 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: spookyhash-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl; spookyhash-2.1.1-cp310-cp310-macosx_11_0_arm64.whl; spookyhash-2.1.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; spookyhash-2.1.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; spookyhash-2.1.1-cp310-cp310-musllinux_1_2_aarch64.whl; spookyhash-2.1.1-cp310-cp310-musllinux_1_2_x86_64.whl; spookyhash-2.1.1-cp310-cp310-win32.whl; spookyhash-2.1.1-cp310-cp310-win_amd64.whl; spookyhash-2.1.1-cp310-cp310-win_arm64.whl; spookyhash-2.1.1-cp311-cp311-macosx_10_9_x86_64.whl; spookyhash-2.1.1-cp311-cp311-macosx_11_0_arm64.whl; spookyhash-2.1.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; spookyhash-2.1.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; spookyhash-2.1.1-cp311-cp311-musllinux_1_2_aarch64.whl; spookyhash-2.1.1-cp311-cp311-musllinux_1_2_x86_64.whl; spookyhash-2.1.1-cp311-cp311-win32.whl; spookyhash-2.1.1-cp311-cp311-win_amd64.whl; spookyhash-2.1.1-cp311-cp311-win_arm64.whl; spookyhash-2.1.1-cp312-cp312-macosx_10_13_x86_64.whl; spookyhash-2.1.1-cp312-cp312-macosx_11_0_arm64.whl
Keywords: SpookyHash, hashlib
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
xxhashxxhash provides fast non-cryptographic hashing…
permissive · top 1,000 on PyPI
cityhashPython wrapper for Google's CityHash and…
permissive · top 15,000 on PyPI
siphashProvides a Python implementation of SipHash, a…
permissive · top 15,000 on PyPI
mmhash3mmhash3 is a Python wrapper for MurmurHash3,…
permissive · top 15,000 on PyPI
murmurhash2Provides 32-bit murmurhash2 and murmurhash3…
permissive · top 5,000 on PyPI
murmurhashProvides fast MurmurHash2 hashing through…
permissive · top 1,000 on PyPI
py-multihashEncodes and decodes multihash digests,…
permissive · top 15,000 on PyPI
clickhouse-cityhashProvides Python bindings to CityHash, a fast…
permissive · top 15,000 on PyPI
pyfarmhashProvides Python bindings to Google's FarmHash,…
permissive · top 15,000 on PyPI
bbhashBuilds minimal perfect hash functions for…
unclear · top 15,000 on PyPI