--- id: pyfarmhash version: "0.4.0" license: unclear license_treatment: permissive maintenance: active --- # pyfarmhash — Google FarmHash Bindings for Python License: permissive · Maintenance: active · Downloads: 644.3K/mo ## What it is and what it does pyfarmhash wraps Google's FarmHash algorithm, a non-cryptographic hash function optimized for speed and distribution quality. It exposes hash64 and hash64withseed functions that take strings or bytes and return 64-bit hash values, plus fingerprint functions. The package is a thin binding layer with no runtime dependencies, making it lightweight for applications that need fast hashing for indexing, deduplication, or data structures rather than security. The package is maintained and supports Python versions from 2.6 through 3.11. Installation requires a C++ compiler on most platforms, though Windows binary wheels are available. The API is minimal and straightforward: import the module and call the hash functions directly. Use it for: - Hash table and data structure construction where speed matters more than cryptographic strength - Deduplication of large datasets by computing fast fingerprints of records - Distributed systems needing consistent, fast hashing across nodes for load balancing or sharding - Bloom filters and probabilistic data structures that require many hash computations per item ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides Python bindings to Google's FarmHash, a fast non-cryptographic hash function for computing 64-bit and fingerprint hashes of strings and byte sequences. Yes, if you need fast non-cryptographic hashing and can handle the C++ compilation step. The package is actively maintained, has no known vulnerabilities, and carries a permissive license. Install friction is moderate but manageable; Windows users benefit from prebuilt wheels. Not suitable if you need cryptographic hashing or cannot compile C++ extensions in your environment. ## Install pip install pyfarmhash uv add pyfarmhash poetry add pyfarmhash ## Installing pyfarmhash Before you install: Medium install friction due to compiled C++ extension requiring a compiler (g++ on Linux, Visual C++ on Windows). Repository is actively maintained with last commit on 2026-03-06, though the package last released 717 days ago. License in practice: MIT license (permissive) means you can use, modify, and distribute this package freely with minimal restrictions, provided you include the license notice. Quickstart: pip install pyfarmhash import pyfarmhash print(pyfarmhash.hash64('abc')) print(pyfarmhash.hash64withseed('abc', 12345)) Requires a C++ compiler (g++ on Linux; Visual C++ on Windows) to build the extension from source. Windows binary wheels are available on PyPI for some Python versions. Verify before relying: - Whether prebuilt wheels are available for all advertised Python versions or only a subset - Current performance characteristics compared to other non-cryptographic hash libraries - Whether the fingerprint function bindings mentioned in the description are fully exposed in the public API ## Package facts - License: not declared (permissive) - Python support: unspecified - Install friction: medium - Maintenance: active - Downloads: 644.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags fast non-cryptographic hashing, farmhash python bindings, google farmhash, 64-bit hash function, fingerprint hashing, string hashing library, hashing, c-extension [View on SkillFed](https://skillfed.io/packages/pyfarmhash) · [View on PyPI](https://pypi.org/project/pyfarmhash/)