Skip to main content

fmd5sum

fmd5sum is a small, cross-platform command-line tool and Python library for calculating standard MD5 checksums. It processes multiple files concurrently, keeps output in input order, and returns a non-zero exit status if any file cannot be read.

Requirements

  • Python 3.10 or newer
  • Windows, macOS, or Linux
  • No runtime dependencies outside the Python standard library

Installation

Install the command with pipx

This is the recommended option for end users because it keeps the command in an isolated environment:

pipx install fmd5sum
fmd5sum --help

Install with pip

python -m pip install fmd5sum

Install from source

Clone the repository, create a virtual environment, and install the project.

Windows PowerShell:

git clone https://github.com/jlchen5/fmd5sum.git
cd fmd5sum
py -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install .

macOS or Linux:

git clone https://github.com/jlchen5/fmd5sum.git
cd fmd5sum
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install .

Install with Conda

conda env create -f environment.yml
conda activate fmd5sum-env

Usage

Calculate one or more checksums:

fmd5sum file1.txt file2.img

Wildcard patterns are expanded by fmd5sum, including on Windows shells that do not expand them. Quote the pattern to get consistent behavior:

fmd5sum "images/*.jpg" "images/*.png"

Choose the worker count and read block size:

fmd5sum --workers 4 --blocksize 1048576 file1.iso file2.iso

The package can also be run without installing its console script:

python -m fmd5sum file1.txt file2.img

Run fmd5sum --help for all options. A successful run returns exit code 0. If one or more files cannot be processed, valid checksums are still printed and the command returns exit code 1. Invalid arguments return exit code 2.

Python API

from fmd5sum import md5sum, process_files

checksum = md5sum("path/to/file.ext")
status = process_files(["file1.txt", "file2.img"], max_workers=4)

md5sum() returns None and reports an error to stderr when the file cannot be read. It raises ValueError when blocksize is not positive. process_files() returns a command-style status code: 0 for success and 1 when at least one file failed.

Performance

Concurrency is applied across independent files. A single file is read by one worker because standard MD5 has a sequential chaining dependency. The default worker count is capped at eight and never exceeds the number of input files or available CPUs. Use --workers to tune throughput for the storage device.

Thread-based workers avoid multiprocessing startup and serialization overhead, especially on Windows and macOS. Actual throughput depends mainly on storage, file sizes, cache state, and the number of independent devices. Benchmark with representative data before increasing concurrency.

Development and packaging

Install development dependencies and run the tests:

python -m pip install -e ".[dev]"
python -m pytest

Build a platform-independent wheel and source archive:

python -m build

The artifacts are written to dist/. The generated py3-none-any wheel can be installed on Windows, macOS, and Linux with a supported Python version.

License

This project is licensed under the MIT License. See LICENSE.

Metadata

Release files for fmd5sum 0.3.0

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

Source distribution (sdist)

Source distribution for fmd5sum 0.3.0
File Size Uploaded Provenance
fmd5sum-0.3.0.tar.gz 7.1 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for fmd5sum 0.3.0
File Interpreter ABI Platform
fmd5sum-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.1 kB

Release files / fmd5sum-0.3.0.tar.gz

Download URL fmd5sum-0.3.0.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
c9fea14f51c8d9189ed12727bb0698566531f02c5916d5cf898790dcf8502d66
BLAKE2b-256 checksum
How to use checksums
ef2791a10455af850abb30a3730edd175d8973eb8e5f7207874bedc7bc32e5ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.

Transparency log

Release files / fmd5sum-0.3.0-py3-none-any.whl

Download URL fmd5sum-0.3.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5a9a0ebb76314457aeddf328c56b8e09165318f6885dd0e069fb934941af7b9
BLAKE2b-256 checksum
How to use checksums
a16927cd4fe3ff0828ddf447e2d04dc7d8b7243e348cffe07330f0f78e3609e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.

Transparency log

Security for fmd5sum 0.3.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fmd5sum-0.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files Full 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