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
pycksum-0.6.1.tar.gz 65.1 kB Details

Built distribution (wheel)

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

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}

Release history Release notifications | RSS feed

This release

0.6.1 This release

2 release files

0.5.0

2 release files

0.4.7

1 release file

0.4.6

1 release file

0.4.5

1 release file

0.4.4

9 release files

0.4.3

1 release file

0.4.2

1 release file

0.4.1

2 release files

0.4.0

1 release file

0.3.6

3 release files

0.3.4

2 release files

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.0

1 release file

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