skillfed

crcmod

CRC Generator

crcmod v1.7 8.2M downloads/30d#1,649 on PyPI
Permissive license MIT Abandoned released

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 crcmod

uv

uv add crcmod

poetry

poetry add crcmod

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: End Users/DesktopIntended Audience :: Information TechnologyIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: CProgramming Language :: C++Programming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.4Programming Language :: Python :: 2.5Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.1Topic :: CommunicationsTopic :: Scientific/Engineering :: Interface Engine/Protocol TranslatorTopic :: Scientific/Engineering :: MathematicsTopic :: Utilities

Tags

crc calculation pythoncyclic redundancy check generatorcrc polynomial computationchecksum verificationcrc hash function
checksumdata-integritylegacy

More Utilities packages