skillfed

crc

Pure Python CRC library

crc v7.1.0 911.0K downloads/30d#4,747 on PyPI64
Permissive license BSD-2-Clause AGING released

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 crc

uv

uv add crc

poetry

poetry add crc

Installing 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

License :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

crc checksum calculationcrc verificationcyclic redundancy checkcrc8 crc16 crc32checksum library pythondata integrity verificationcrc configuration
checksumdata-integrityerror-detection

More Software Development packages