Skip to main content

Modbus CRC-16

License Downloads Latest Version Supported Python versions

CRC-16 calculation library for Modbus protocol

Installation

Install it with pip:

$ pip install modbus-crc

Or you can add it as dependency in requirements.txt file of your python application:

modbus-crc~=1.3

Usage

For signing byte package use add_crc:

from modbus_crc import add_crc

signed_package = add_crc(b'\x00\x12\x34\xAB\xCD\xEF')

Result is b'\x00\x12\x34\xAB\xCD\xEF\xD2\xD4. For validation signed package use check_crc:

from modbus_crc import check_crc

if not check_crc(b'\x00\x12\x34\xAB\xCD\xEF\xD2\xD4'):
    raise SomeException()

Testing

$ python -m unittest discover -v -p "tests.py"

Metadata

Release files for modbus-crc 1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for modbus-crc 1.3
File Size Uploaded Provenance Actions
modbus-crc-1.3.tar.gz 3.7 kB Without provenance Details for modbus-crc-1.3.tar.gz

Release files / modbus-crc-1.3.tar.gz

Download URL modbus-crc-1.3.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c860d8443d9a416bb1bb45e853c6f93a0500e759204ca24c24ab3b4f942c862c
BLAKE2b-256 checksum
How to use checksums
11f52368f483dbcb1df7be9cc9e153c4baecbeb15c74525a2ee05e96ed0566b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Security for modbus-crc 1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.3 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page