Skip to main content
File added late

1 file was added to this release more than 14 days after its initial publication. Inspect the release files before installing.

CRC is a way of detecting accidental changes in data storage or transmission. There are many variants of CRC and CRC16, in particular. This library calculates only CRC16 (16-bit codes) and the only supported variant at the moment is CRC-CCITT (XModem).

If you want to know more about CRC, http://wikipedia.org/wiki/Cyclic_redundancy_check is a good place to start.

If you want other variants of CRC16 supported, please make a request at http://code.google.com/p/pycrc16/issues

Source codes are hosted at https://github.com/gennady/pycrc16 If you want to contribute to this library, create a fork, make you changes and then create a pull request. Any help is appreciated.

Installation

On Windows you can use precompiled binaries which can be found at http://code.google.com/p/pycrc16/downloads

On Linux and other operation systems you should compile the library from the source codes. To do this on Linux use following steps:

  • download source tarball, e.g. crc16-0.1.1.tar.gz, from http://code.google.com/p/pycrc16/downloads

  • extract it with command:

    tar -xzf crc16-0.1.1.tar.gz
  • compile and install the library:

    cd crc16-0.1.1
    python setup.py build
    sudo python setup.py install

    you will need the administrative privileges to execute the last command.

After installation you can run unit tests to make sure that the library works fine. Execute:

python -m crc16.test

Usage

In Python 3:

import crc16
print(crc16.crc16xmodem(b'123456789'))

In Python 2 you should use strings instead of binary data:

import crc16
print(crc16.crc16xmodem('123456789'))

You can also calculate CRC gradually:

import crc16
crc = crc16.crc16xmodem(b'1234')
crc = crc16.crc16xmodem(b'56789', crc)
print(crc)

Other projects

There are a number of projects and libraries for CRC calculation. See for example:

Release files for crc16 0.1.1

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

File added late

1 file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release files before installing.

Source distributions (sdists)

Source distribution for crc16 0.1.1
File Size Uploaded
crc16-0.1.1.zip 20.9 kB Details
crc16-0.1.1.tar.gz 9.6 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for crc16 0.1.1
File
crc16-0.1.1.win32-py3.3.exe Details
crc16-0.1.1.win32-py3.2.exe Details
crc16-0.1.1.win32-py3.1.exe Details
crc16-0.1.1.win32-py2.7.exe Details
crc16-0.1.1.win32-py2.6.exe Details

Total release size: 1.1 MB

Release files / crc16-0.1.1.zip

Download URL crc16-0.1.1.zip
Size 20.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1b9f697a93491ae42ed653c1e78ea25a33532afab87b513e6890975450271a01
BLAKE2b-256 checksum
How to use checksums
27f844fab1c8f71faafa1e5bbbb6e38102779846eb17d0e71885e952a5db3d28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / crc16-0.1.1.tar.gz

Download URL crc16-0.1.1.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c1f86aa0390f4baf07d2631b16b979580eae1d9a973a826ce45353a22ee8d396
BLAKE2b-256 checksum
How to use checksums
a6e070a44c4385f2b33df82e518005aae16b5c1feaf082c73c0acebe3426fc0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / crc16-0.1.1.win32-py3.3.exe

File added late

This file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release file before installing.

Download URL crc16-0.1.1.win32-py3.3.exe
Size 202.8 kB
Tags Source
SHA-256 checksum
How to use checksums
63db8577ce0e03b39f30071166c6667659124a65d7fcd38adffe6a34487ce6fb
BLAKE2b-256 checksum
How to use checksums
477388a4a3fe1270d36789e34ac21550b21693195251f80191cee149da1b073c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / crc16-0.1.1.win32-py3.2.exe

Download URL crc16-0.1.1.win32-py3.2.exe
Size 208.2 kB
Tags Source
SHA-256 checksum
How to use checksums
521643768ff000a7758bc1f1c5e1dc41ae64b42fa57c50e133ab083cfaf9b8f9
BLAKE2b-256 checksum
How to use checksums
33cce338915627c0b148c378ae249105e37efe31f70b1fb7d84e81f3c88a6dab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / crc16-0.1.1.win32-py3.1.exe

Download URL crc16-0.1.1.win32-py3.1.exe
Size 208.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1439e3cc0244a4758aa2d40a31b062086c24f5602046ec2fa4356484c4b5a385
BLAKE2b-256 checksum
How to use checksums
d9d732338df319b6b8845d0ae3b32a0bdb58ebbde76cf3dde3471f4cf7bd7ed6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / crc16-0.1.1.win32-py2.7.exe

Download URL crc16-0.1.1.win32-py2.7.exe
Size 208.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7998bb0cacb0005ba62f963540c0f7cb09e86b51f6b4e64ed5632f31a7266fa1
BLAKE2b-256 checksum
How to use checksums
62b4b6ee4d4019542ccac4eab0fec34da101235fce6b82128f146f933355ed06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / crc16-0.1.1.win32-py2.6.exe

Download URL crc16-0.1.1.win32-py2.6.exe
Size 208.2 kB
Tags Source
SHA-256 checksum
How to use checksums
eb47b9cec9818b684537d05552ff10404c92d9dcdd455156456b19e7423855bc
BLAKE2b-256 checksum
How to use checksums
3c8a745b9c24ac19c6941e38ecf29ed3b2e564e796485426642c102fe84520c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.1 This release

7 release files

0.1.0

4 release files

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