Skip to main content

py-multihash

https://img.shields.io/pypi/v/py-multihash.svg https://github.com/multiformats/py-multihash/actions/workflows/tox.yml/badge.svg Documentation Status

Multihash implementation in Python

Features

  • Support for 125+ hash functions including:

    • Cryptographic hashes: SHA-1, SHA-2 (224/256/384/512), SHA-3, BLAKE2b, BLAKE2s, BLAKE3

    • Variable-length hashes: SHAKE-128, SHAKE-256

    • Non-cryptographic hashes: MurmurHash3 (32-bit and 128-bit)

    • Specialized hashes: Double-SHA-256 (Bitcoin), Keccak, and more

    • BLAKE2 variants: Full range of digest sizes (8-512 bits for BLAKE2b, 8-256 bits for BLAKE2s)

  • Streaming hash computation for large files

  • Hash truncation support

  • JSON serialization

  • MultihashSet collection type

  • Go-compatible API (sum(), digest(), verify())

Quick Start

from multihash import digest, sum, Func

# Using modern hash functions
mh = digest(b"hello world", "blake3")

# Using MurmurHash3 for fast, non-cryptographic hashing
mh = digest(b"data", "murmur3-128")

# Using BLAKE2b with custom digest size
mh = digest(b"data", "blake2b-256")

# Go-compatible API
mh = sum(b"hello world", Func.sha2_256)
print(mh.encode('hex'))

For more examples and usage, see the documentation.

Metadata

Release files for py-multihash 4.0.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 py-multihash 4.0.0
File Size Uploaded Provenance Actions
py_multihash-4.0.0.tar.gz 53.0 kB Without provenance Details for py_multihash-4.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for py-multihash 4.0.0
File Interpreter ABI Platform Actions
py_multihash-4.0.0-py3-none-any.whl Python 3 none any Details for py_multihash-4.0.0-py3-none-any.whl

Total release size: 80.6 kB

Release files / py_multihash-4.0.0.tar.gz

Download URL py_multihash-4.0.0.tar.gz
Size 53.0 kB
Tags Source
SHA-256 checksum
How to use checksums
82d5302d7af1c4034809f50e44fd21c90aa5cc5e9af4fd9c2063a0cf56dc36e9
BLAKE2b-256 checksum
How to use checksums
211d78da95c58c50b858c88f80aadf9798c8fdfef07bd022a931c36986ef3ce4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / py_multihash-4.0.0-py3-none-any.whl

Download URL py_multihash-4.0.0-py3-none-any.whl
Size 27.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48c45a5bed498e7d95aa6e4d3e576f9a1bd65913bd1618664e08cc84b7de2795
BLAKE2b-256 checksum
How to use checksums
58637c8a5484efb26e8e8342d41e8ffd891df010986fc198cc1e8c9cc21fc768
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for py-multihash 4.0.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.

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