crc
Pure Python CRC library
What it is and what it does
This is a pure Python library for computing CRC (cyclic redundancy check) checksums across multiple standard configurations and bit widths. It provides Calculator and Register classes to compute checksums on byte data, verify checksums against expected values, and supports both standard and table-based (optimized) computation modes.
The library ships with predefined configurations for common CRC variants (CCITT, XMODEM, MODBUS, GSM, PROFIBUS, and others across CRC8, CRC16, CRC32, and CRC64 widths), and allows defining custom configurations by specifying polynomial, init value, final XOR, and input/output reversal parameters. It has no external runtime dependencies and supports Python 3.8 through 3.12.
Use it for:
- Verify data integrity in serial communication protocols that use CRC error detection.
- Implement checksum validation for file transfers or network packet verification.
- Generate CRC values for embedded systems or legacy hardware that expect specific CRC configurations.
- Add data integrity checks to custom binary formats or wire protocols.
- Validate checksums in BZIP2, POSIX, or other standard formats that use CRC.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Calculate, verify, and manage CRC checksums using predefined configurations (CRC8, CRC16, CRC32, CRC64) or custom parameters.
Yes, for straightforward CRC checksum needs. The library is permissively licensed, has no dependencies, and covers common CRC configurations out of the box. Aging maintenance (647 days since last release) is a minor concern but the repository remains active and the codebase is stable; use it when you need standard CRC support without external dependencies.
Install
crc on PyPI
pip
pip install crcuv
uv add crcpoetry
poetry add crcInstalling crc
Before you install
Low install friction with no runtime dependencies. Aging maintenance status (647 days since last release, last commit 2026-01-12) but repository remains active and not archived.
License in practice
BSD-2-Clause permissive license allows use in most projects with minimal restrictions; attribution required.
Quickstart
pip install crc
from crc import Calculator, Crc8
calculator = Calculator(Crc8.CCITT)
checksum = calculator.checksum(bytes([0, 1, 2, 3, 4, 5]))
print(checksum)
Requires Python >= 3.8. Currently supports only bit widths that are full bytes (8, 16, 24, 32, etc.).
Verify before relying
- Performance characteristics of optimized mode versus standard mode for large datasets.
- Whether the library handles streaming/incremental checksum updates efficiently.
Package facts
| License | BSD-2-Clause (permissive) |
| Python support | supports the current Python release (<4.0,>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 647 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 910,970/month — #4,747 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: crc-7.1.0-py3-none-any.whl
Keywords: CRC, CRC8, CRC16, CRC32, CRC64
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
anycrcCalculates CRC hashes of arbitrary bit widths…
permissive · top 15,000 on PyPI
crccheckCalculates CRC and checksum values from binary…
permissive · top 5,000 on PyPI
crcengineCrcEngine provides table-based and bit-bashing…
copyleft · top 15,000 on PyPI
fastcrcfastcrc computes CRC checksums (8, 16, 32, and…
permissive · top 5,000 on PyPI
lpc-checksumCalculates LPC firmware checksums for embedded…
permissive · top 15,000 on PyPI
crcmodComputes Cyclic Redundancy Check (CRC) values…
permissive · top 5,000 on PyPI
libscrclibscrc provides a compiled library for…
copyleft · top 15,000 on PyPI
crc32cComputes CRC32C checksums using hardware…
copyleft · top 1,000 on PyPI
paytmchecksumGenerates and verifies checksums for Paytm…
permissive · top 15,000 on PyPI
luhnGenerates and verifies Luhn check digits for…
permissive · top 15,000 on PyPI