clickhouse-cityhash
Python-bindings for CityHash, a fast non-cryptographic hash algorithm
What it is and what it does
This package wraps Google's CityHash algorithm in Python, specifically forked to match an older version of the algorithm used by ClickHouse servers. CityHash is a fast, non-cryptographic hash function designed for speed rather than cryptographic security, making it suitable for data integrity checks, hash tables, and distributed systems where collision resistance is less critical than performance.
The package is primarily intended as a third-party library for applications that need to hash data using the ClickHouse protocol. It has no runtime dependencies and compiles to native code via C++ and Cython, providing direct access to the underlying hash functions. The maintainers explicitly recommend using the original python-cityhash package for general-purpose hashing needs outside the ClickHouse ecosystem.
Use it for:
- Hashing data for compatibility with ClickHouse protocol implementations and servers.
- Computing fast non-cryptographic hashes in performance-critical data processing pipelines.
- Distributed systems or databases that rely on CityHash for partitioning or sharding.
- Verifying data integrity in systems already using ClickHouse's hashing scheme.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Python bindings to CityHash, a fast non-cryptographic hashing algorithm, specifically tuned for ClickHouse protocol compatibility.
Yes, if you are integrating with ClickHouse and need algorithm-version compatibility. The package is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and offers broad platform support via pre-built wheels. Install only if you specifically need ClickHouse protocol compatibility; for general-purpose hashing, use the original python-cityhash package instead.
Install
clickhouse-cityhash on PyPI
pip
pip install clickhouse-cityhashuv
uv add clickhouse-cityhashpoetry
poetry add clickhouse-cityhashInstalling clickhouse-cityhash
Before you install
Medium install friction due to compiled C++ extensions; pre-built wheels available for common platforms (x86_64, ARM, PowerPC, s390x on Linux/macOS/Windows). Active maintenance with recent release.
License in practice
MIT license permits commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install clickhouse-cityhash
import clickhouse_cityhash
hash_value = clickhouse_cityhash.CityHash64('your_data')
Requires a C++ compiler and build tools during installation if a pre-built wheel is not available for your platform.
Verify before relying
- Whether the downgraded CityHash algorithm version matches your ClickHouse server version requirements.
- Performance characteristics compared to the original python-cityhash package for your use case.
- Compatibility with Python versions beyond those explicitly listed in classifiers (2.7, 3.6).
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 31 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 463,446/month — #6,521 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: clickhouse_cityhash-1.0.2.6-cp310-cp310-macosx_10_9_x86_64.whl; clickhouse_cityhash-1.0.2.6-cp310-cp310-macosx_11_0_arm64.whl; clickhouse_cityhash-1.0.2.6-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; clickhouse_cityhash-1.0.2.6-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; clickhouse_cityhash-1.0.2.6-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl; clickhouse_cityhash-1.0.2.6-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl; clickhouse_cityhash-1.0.2.6-cp310-cp310-musllinux_1_2_aarch64.whl; clickhouse_cityhash-1.0.2.6-cp310-cp310-musllinux_1_2_ppc64le.whl; clickhouse_cityhash-1.0.2.6-cp310-cp310-musllinux_1_2_s390x.whl; clickhouse_cityhash-1.0.2.6-cp310-cp310-musllinux_1_2_x86_64.whl; clickhouse_cityhash-1.0.2.6-cp310-cp310-win32.whl; clickhouse_cityhash-1.0.2.6-cp310-cp310-win_amd64.whl; clickhouse_cityhash-1.0.2.6-cp311-cp311-macosx_10_9_x86_64.whl; clickhouse_cityhash-1.0.2.6-cp311-cp311-macosx_11_0_arm64.whl; clickhouse_cityhash-1.0.2.6-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; clickhouse_cityhash-1.0.2.6-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; clickhouse_cityhash-1.0.2.6-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl; clickhouse_cityhash-1.0.2.6-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl; clickhouse_cityhash-1.0.2.6-cp311-cp311-musllinux_1_2_aarch64.whl; clickhouse_cityhash-1.0.2.6-cp311-cp311-musllinux_1_2_ppc64le.whl
Keywords: hash, hashing, cityhash
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
cityhashPython wrapper for Google's CityHash and…
permissive · top 15,000 on PyPI
murmurhashProvides fast MurmurHash2 hashing through…
permissive · top 1,000 on PyPI
mmhash3mmhash3 is a Python wrapper for MurmurHash3,…
permissive · top 15,000 on PyPI
pyfarmhashProvides Python bindings to Google's FarmHash,…
permissive · top 15,000 on PyPI
mmh3mmh3 is a Python binding to MurmurHash3, a fast…
permissive · top 1,000 on PyPI
fnvhashComputes FNV hash values in pure Python,…
permissive · top 5,000 on PyPI
siphashProvides a Python implementation of SipHash, a…
permissive · top 15,000 on PyPI
siphashcsiphashc provides a Python binding to the…
permissive · top 15,000 on PyPI
py-multihashEncodes and decodes multihash digests,…
permissive · top 15,000 on PyPI
blake3Python bindings for the BLAKE3 cryptographic…
permissive · top 5,000 on PyPI