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 cchecksumVerified import paths — ran on the pinned version, not inferred.
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.
Upgrade Python to 3.9+ or pin `cchecksum<0.4.0` in your dependencies.
Replace `from eth_utils import to_checksum_address` with `from cchecksum import to_checksum_address` in your codebase.
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.
Run `pip install cchecksum`.
Verify the import statement is exactly `from cchecksum import to_checksum_address`. If it persists, try reinstalling `cchecksum`.
Ensure `eth-hash` is installed: `pip install eth-hash`. Reinstalling `cchecksum` (`pip install cchecksum`) should also pull its dependencies.
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).