crcmod
CRC Generator
What it is and what it does
crcmod is a Python module for generating CRC computation objects. It supports any 8, 16, 24, 32, or 64-bit CRC polynomial and can produce either a standalone Python function or a Crc class instance with an interface matching the standard library's md5 and sha modules. The package includes a predefined module with standard polynomials, eliminating the need to research and specify your own in common cases.
The module can also generate C/C++ source code for CRC computation in other applications. Installation attempts to build a C extension for performance; if compilation fails, a pure Python implementation is used instead, though it runs significantly slower. The package is abandoned and has not been updated since 2010, with no documented support for Python versions beyond 3.1.
Use it for:
- Verify data integrity in network protocols or file transfers by computing and comparing CRC checksums
- Generate CRC functions for embedded systems or legacy protocols that specify particular polynomials
- Export C/C++ code for CRC computation to be compiled and used in non-Python applications
- Validate messages in communication systems that use standard CRC polynomials like CRC-32
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Computes Cyclic Redundancy Check (CRC) values for 8, 16, 24, 32, or 64-bit polynomials, providing both Python functions and a class interface compatible with standard library hash modules.
Yes, but with caution. The package is stable and widely used (8.2M monthly downloads), carries no known vulnerabilities, and is MIT-licensed. However, it is abandoned (last release 2010-06-27) with no documented support beyond Python 3.1. Install only if you need CRC computation and can verify compatibility with your Python version; for modern projects, consider whether a maintained alternative exists or whether you can vendor the pure Python fallback.
Install
crcmod on PyPI
pip
pip install crcmoduv
uv add crcmodpoetry
poetry add crcmodInstalling crcmod
Before you install
High install friction: the package is abandoned (last release 2010-06-27) and relies on optional C extension compilation. Friction evidence shows only legacy Windows installers and source distributions; no wheels or modern packaging. Installation falls back to pure Python if compilation fails, but the C extension is significantly faster.
License in practice
MIT license (permissive) imposes no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
import crcmod
# Create a CRC function for a standard polynomial
pred_crc32 = crcmod.predefined.mkCrcFun('crc-32')
checksum = pred_crc32(b'data')
print(checksum)
C compiler required to build the optional extension module for performance; pure Python fallback available but significantly slower. Package tested only on Python 2.4–2.7 and 3.1; compatibility with modern Python versions is unverified.
Verify before relying
- Whether the package works on Python versions beyond 3.1 (last tested version documented)
- Current compatibility with modern C compilers and build toolchains
- Whether the pure Python fallback remains functional on current Python releases
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 5,892 days since the last release |
| First released | |
| Downloads | 8,213,276/month — #1,649 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: crcmod-1.7.tar.gz; crcmod-1.7.win32-py2.6.msi; crcmod-1.7.win32-py2.7.msi; crcmod-1.7.win32-py3.1.msi
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
fastcrcfastcrc computes CRC checksums (8, 16, 32, and…
permissive · top 5,000 on PyPI
crcCalculate, verify, and manage CRC checksums…
permissive · top 5,000 on PyPI
anycrcCalculates CRC hashes of arbitrary bit widths…
permissive · top 15,000 on PyPI
crcengineCrcEngine provides table-based and bit-bashing…
copyleft · top 15,000 on PyPI
crccheckCalculates CRC and checksum values from binary…
permissive · top 5,000 on PyPI
libscrclibscrc provides a compiled library for…
copyleft · top 15,000 on PyPI
filehashCalculates and verifies file checksums and…
permissive · top 15,000 on PyPI
red-black-tree-modProvides Python implementations of red-black…
permissive · top 5,000 on PyPI
checksumdirComputes a single hash digest of all file…
permissive · top 15,000 on PyPI
crc32cComputes CRC32C checksums using hardware…
copyleft · top 1,000 on PyPI