Registry / serialization / cchecksum

cchecksum

JSON →
library0.4.4pypypi✓ verified 86d ago

cchecksum is a Python library that provides an approximately 18x faster, C-implemented drop-in replacement for `eth_utils.to_checksum_address`. It ensures full API compatibility, raising the exact same exceptions as the original `eth_utils` function. Currently at version 0.4.3, the library is actively maintained with a focus on performance optimizations and broad platform compatibility through pre-built wheels.

pip install cchecksum
INSTALL
IMPORT
SIG · CCHECKSUM
C
cchecksum
serializationpythonv0.4.4
Install
1.9s avg
Import
230ms
Disk
20MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.4.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.241s · 21.2MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.9s · import 0.219s · 22MB
20MB installed
● package 20MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

to_checksum_address
from cchecksum import to_checksum_address
from eth_utils import to_checksum_address
cchecksum is a drop-in replacement; using the eth_utils import will not utilize the performance benefits of cchecksum.

This quickstart demonstrates how to import and use the `to_checksum_address` function from `cchecksum` with both hexadecimal string and raw bytes inputs, producing an EIP-55 checksummed Ethereum address.

from cchecksum import to_checksum_address from binascii import unhexlify # Convert a lowercase hex string with 0x prefix address_hex_lower = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" checksummed_address = to_checksum_address(address_hex_lower) print(f"Original: {address_hex_lower}") print(f"Checksummed: {checksummed_address}") # Convert bytes input (must be 20 bytes long) address_bytes = unhexlify(address_hex_lower[2:]) # Removes '0x' prefix checksummed_bytes_address = to_checksum_address(address_bytes) print(f"Original Bytes: {address_bytes.hex()}") print(f"Checksummed Bytes: {checksummed_bytes_address}")
Debug
Known issues
breakingPython 3.8 support was dropped in cchecksum v0.4.0. Users on Python 3.8 will need to use an older version of cchecksum (pre-0.4.0) or upgrade their Python interpreter to 3.9 or newer.
fix
Upgrade Python to 3.9+ or pin `cchecksum<0.4.0` in your dependencies.
affects: >=0.4.0
gotchaTo benefit from cchecksum's performance improvements, you must explicitly import `to_checksum_address` from `cchecksum`. If `eth_utils.to_checksum_address` remains in your code, you will continue to use the slower Python-based implementation.
fix
Replace `from eth_utils import to_checksum_address` with `from cchecksum import to_checksum_address` in your codebase.
affects: All
gotchaInstallation may require a C compiler if pre-compiled wheels are not available for your specific Python version and operating system. The core logic is implemented in C and Cython.
fix
Ensure you have a C compiler installed (e.g., `build-essential` on Linux, Microsoft C++ Build Tools on Windows) if encountering build errors during installation.
affects: All
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'cchecksum'
The cchecksum package is not installed in the current Python environment.
fix
Run `pip install cchecksum`.
ImportError: cannot import name 'to_checksum_address' from 'cchecksum'
Incorrect import statement or a damaged installation. The primary function is `to_checksum_address`.
fix
Verify the import statement is exactly `from cchecksum import to_checksum_address`. If it persists, try reinstalling `cchecksum`.
ModuleNotFoundError: No module named 'eth_hash'
cchecksum relies on `eth-hash` for its internal hashing, and `eth-hash` was not installed as a dependency, potentially due to an old `pip` or incomplete install prior to `v0.3.5`.
fix
Ensure `eth-hash` is installed: `pip install eth-hash`. Reinstalling `cchecksum` (`pip install cchecksum`) should also pull its dependencies.
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": ...
The installation failed because a C compiler is needed to compile cchecksum's C/Cython extensions, and a pre-built wheel was not available for the specific environment.
fix
Install the required C/C++ build tools for your operating system. For Windows, download and install 'Microsoft C++ Build Tools'. For Linux, install development packages like `build-essential` (Debian/Ubuntu) or `gcc` (CentOS/Fedora).
Upgrade
Version history
0.4.4latest on PyPI · released May 27, 2026
Audit
Dependencies
eth-hashrequiredRequired for underlying hashing functionality, explicitly added as a dependency in v0.3.5 and later.
Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
1
Resources
cchecksum — pip install cchecksum · libregistry