There are some libraries to calculate CRC-32 in Python, 2 of them are: zlib and binascii. Here’re the sample codes:
For applications that require data compression, zlib module allow compression and decompression.
zlib has crc32 method to computes a CRC (Cyclic Redundancy Check) checksum of data. If value is present, it is used as the starting value of the checksum; otherwise, a fixed default value is used.
The algorithm is not cryptographically strong, and should not be used for authentication or digital signatures. Since the algorithm is designed for use as a checksum algorithm, it is not suitable for use as a general hash algorithm.
import zlib zlib.crc32(str.encode('hello from loitools.com'))