Skip to main content

pycksum - A Python implementation of the cksum algorithm

Build PyVersion PyPiVersion License

The cksum algorithm generates a checksum for a stream of data. While cksum is not cryptographically strong, it can be used to validate the integrity of transferred files.

Pycksum includes a pure Python implementation of cksum as well as an efficient C extension that will automatically be used on platforms that support it.

Installation

Install from PyPi using pip, a package manager for Python:

$ pip install pycksum

Examples

The simplest way to use pycksum is to just give it a string:

import pycksum
ck = pycksum.cksum("Any string")

You can pass in a file or an iterable:

ck = pycksum.cksum( open("filename"))

ck = pycksum.cksum( ["This", "love", "is", "taking", "its", "toll", "on me"])

If you have a lot of data to process, it's more memory-efficient to calculate the cksum incrementally:

c = pycksum.Cksum()
for data in input_fd:
    c.add(data)
ck = c.get_cksum()
sz = c.get_size()

Metadata

Release files for pycksum 0.6.1

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

Source distribution (sdist)

Source distribution for pycksum 0.6.1
File Size Uploaded Provenance Actions
pycksum-0.6.1.tar.gz 65.1 kB Without provenance Details for pycksum-0.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pycksum 0.6.1
File Interpreter ABI Platform Actions
pycksum-0.6.1-cp315-cp315-macosx_10_15_x86_64.whl CPython 3.15 CPython 3.15 macOS 10.15+ x86-64 Details for pycksum-0.6.1-cp315-cp315-macosx_10_15_x86_64.whl

Total release size: 88.8 kB

Release files / pycksum-0.6.1.tar.gz

Download URL pycksum-0.6.1.tar.gz
Size 65.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5561bcdf337fb1b1e0e9f02f8cade88ee727b13b2de2d13296c926cd21cd6b3e
BLAKE2b-256 checksum
How to use checksums
0214d543d37468488d38133d1f3ca331aefc016410d4222e969341b1d52eeec5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / pycksum-0.6.1-cp315-cp315-macosx_10_15_x86_64.whl

Download URL pycksum-0.6.1-cp315-cp315-macosx_10_15_x86_64.whl
Size 23.7 kB
Tags CPython 3.15 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
ae5b736675881fd56a98090a46220555e4edb62df20b4c17df919f15ddf798db
BLAKE2b-256 checksum
How to use checksums
1f4b6b5f84b6770738516046b4da93f73a4d6488d8b30e8618f2ed5b779ca21f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for pycksum 0.6.1

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.

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