{"id":27672,"library":"crcengine","title":"crcengine","description":"A library for CRC calculation and code generation in Python. Current version 0.4.0.post1. Supports many CRC algorithms and can generate CRC code. Release cadence is sporadic.","status":"active","version":"0.4.0.post1","language":"python","source_language":"en","source_url":"https://github.com/GardenTools/crcengine","tags":["crc","checksum","code-generation"],"install":[{"cmd":"pip install crcengine","lang":"bash","label":"Latest stable"}],"dependencies":[],"imports":[{"note":"","wrong":null,"symbol":"crcengine","correct":"import crcengine"}],"quickstart":{"code":"import crcengine\n\n# Predefined algorithms available\ncrc = crcengine.new('crc32c')\ndata = b'hello world'\nchecksum = crc(data)\nprint(hex(checksum))  # e.g. 0x...\n\n# Using CrcParams for custom CRC (v0.4.0+)\nfrom crcengine import CrcParams\nparams = CrcParams(width=16, polynomial=0x8005, seed=0x0000, reflect_input=False, reflect_output=False, xor_out=0x0000)\ncrc16 = crcengine.new(params)\nprint(hex(crc16(b'test')))","lang":"python","description":"Compute CRC using predefined or custom parameters."},"warnings":[{"fix":"Use from crcengine import CrcParams; params = CrcParams(...); crc = crcengine.new(params)","message":"Passing separate polynomial and seed arguments to crcengine.new() is deprecated since v0.4.0. Use CrcParams instead.","severity":"deprecated","affected_versions":">=0.4.0"},{"fix":"Upgrade to v0.4.0+ or avoid polynomials <8 bits width.","message":"CRC polynomials under 8 bits wide caused an invalid shift and Exception before v0.4.0. Fixed in v0.4.0.","severity":"gotcha","affected_versions":"<0.4.0"},{"fix":"Call the returned function directly: crc = crcengine.new('crc32'); crc(b'data')","message":"Function crcengine.new() returns a callable that takes bytes, not a class instance. Do not attempt to create instances.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Upgrade crcengine: pip install --upgrade crcengine","cause":"Using crcengine version <0.4.0 which does not have CrcParams.","error":"AttributeError: module 'crcengine' has no attribute 'CrcParams'"},{"fix":"Use CrcParams object: from crcengine import CrcParams; crcengine.new(CrcParams(...))","cause":"Passing separate polynomial/seed arguments is deprecated in v0.4.0+ and removed in some versions? Actually it's deprecated but still works in 0.4.0. Might be removed later.","error":"TypeError: new() got an unexpected keyword argument 'polynomial'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}