--- id: clickhouse-cityhash version: "1.0.2.6" license: MIT license_treatment: permissive maintenance: active --- # clickhouse-cityhash — Python-bindings for CityHash, a fast non-cryptographic hash algorithm License: permissive · Maintenance: active · Downloads: 463.4K/mo ## 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 above — 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 pip install clickhouse-cityhash uv add clickhouse-cityhash poetry add clickhouse-cityhash ## Installing 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: unspecified - Install friction: medium - Maintenance: active - Downloads: 463.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags cityhash python bindings, fast non-cryptographic hashing, clickhouse hashing library, cityhash wrapper, hash algorithm python, clickhouse protocol hashing, city hash implementation, hashing, clickhouse, non-cryptographic [View on SkillFed](https://skillfed.io/packages/clickhouse-cityhash) · [View on PyPI](https://pypi.org/project/clickhouse-cityhash/)