Skip to main content

Simple File Checksum Logo

Simple File Checksum

Returns the MD5, SHA1, SHA256, SHA384, or SHA512 checksum of a file


Tests Badge License: MIT Supported Platforms PyPI Supported Versions PyPI PyPI Status Downloads

Installation

Run the following to install:

pip3 install simple-file-checksum

Usage

Python:

>>> from simple_file_checksum import get_checksum
>>> get_checksum("tst/file.txt")
'9e107d9d372bb6826bd81d3542a419d6'
>>> get_checksum("tst/file.txt", algorithm="MD5")
'9e107d9d372bb6826bd81d3542a419d6'
>>> get_checksum("tst/file.txt", algorithm="SHA1")
'2fd4e1c67a2d28fced849ee1bb76e7391b93eb12'
>>> get_checksum("tst/file.txt", algorithm="SHA256")
'd7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592'
>>> get_checksum("tst/file.txt", algorithm="SHA384")
'ca737f1014a48f4c0b6dd43cb177b0afd9e5169367544c494011e3317dbf9a509cb1e5dc1e85a941bbee3d7f2afbc9b1'
>>> get_checksum("tst/file.txt", algorithm="SHA512")
'07e547d9586f6a73f73fbac0435ed76951218fb7d0c8d788a309d785436bbb642e93a252a954f23912547d1e8a3b5ed6e1bfd7097821233fa0538f3db854fee6'

Terminal:

$ simple-file-checksum tst/file.txt
9e107d9d372bb6826bd81d3542a419d6
$ simple-file-checksum tst/file.txt -a MD5
9e107d9d372bb6826bd81d3542a419d6
$ simple-file-checksum tst/file.txt -a SHA1
2fd4e1c67a2d28fced849ee1bb76e7391b93eb12
$ simple-file-checksum tst/file.txt -a SHA256
d7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592
$ simple-file-checksum tst/file.txt -a SHA384
ca737f1014a48f4c0b6dd43cb177b0afd9e5169367544c494011e3317dbf9a509cb1e5dc1e85a941bbee3d7f2afbc9b1
$ simple-file-checksum tst/file.txt -a SHA512
07e547d9586f6a73f73fbac0435ed76951218fb7d0c8d788a309d785436bbb642e93a252a954f23912547d1e8a3b5ed6e1bfd7097821233fa0538f3db854fee6

Developing

To install simple-file-checksum, along with the tools you need to develop and run tests, run the following:

pip3 install -e ".[dev]"

Metadata

Release files for simple-file-checksum 1.3.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 simple-file-checksum 1.3.1
File Size Uploaded Provenance Actions
simple_file_checksum-1.3.1.tar.gz 4.2 kB Without provenance Details for simple_file_checksum-1.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for simple-file-checksum 1.3.1
File Interpreter ABI Platform Actions
simple_file_checksum-1.3.1-py3-none-any.whl Python 3 none any Details for simple_file_checksum-1.3.1-py3-none-any.whl

Total release size: 8.8 kB

Release files / simple_file_checksum-1.3.1.tar.gz

Download URL simple_file_checksum-1.3.1.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fd5e083500f6e45daf252e9f5a62a3ddc622fd895e4bd68c4be89c7ddeec700e
BLAKE2b-256 checksum
How to use checksums
b27b71e950765fafaeb0b34116f50e736be8f0a96628e07d7d3f4d5e20ae54b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.2

Release files / simple_file_checksum-1.3.1-py3-none-any.whl

Download URL simple_file_checksum-1.3.1-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c3f9519a3db4f12358a55c219c98ae4c1111d79f4e08c77715a626d1f6b4972
BLAKE2b-256 checksum
How to use checksums
a0ab977d3b5d910a53e59ecbb97b6f1b701bc4b4848a80384c264d010bbd5cca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.2

Security for simple-file-checksum 1.3.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