Practical overview
When it fits
Use Merkly when a Python application needs documented Merkle-tree operations, especially root and proof generation or proof verification.
Who it is for
- Python developers building blockchain-related data utilities
- Developers preparing Merkle roots or proofs for application workflows
- Teams whose Python code needs to check Merkle proofs
Documented uses
- Build a Merkle tree from input leaves and retrieve its root.
- Generate a proof for a leaf.
- Verify a proof against a leaf and tree.
- Choose a custom hash function instead of the Keccak-256 default.
Requirements & limits
The repository is public and specifies an MIT license. Installation instructions are provided for pip and Poetry.
- Keccak-256 is used by default if no hash function is supplied.
- The README shows a custom hash function with the type
(bytes, bytes) -> bytes. - The root example is described as compatible with MerkleTreeJS.
- The README lists a Rust accelerator as alpha and Solidity and MerkleTreeJS tutorials as design-stage.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install Merkly in a Python project
Add the library to a project using one of its documented package-manager commands.
Before you start
- A Python project
- pip or Poetry
Steps
For pip, run the command below.
pip install merklyFor Poetry, run
poetry add merkly.
Expected outcome
Merkly is added to the project through the selected package manager.
Guide limitations
- These instructions cover installation only, not application integration or deployment.
Create and verify a Merkle proof in Python
Follow the README example to generate a proof for a leaf and verify it against its tree.
Before you start
- Merkly installed in a Python project
- A set of leaves to place in a Merkle tree
Steps
Import
MerkleTreefrommerkly.mtreeand create a tree from the leaves.Call
mtree.proof('b')to obtain a proof for the example leaf.Pass the proof and raw leaf to
mtree.verify(p, 'b').
Expected outcome
The documented example checks a proof for a leaf against the Merkle tree.
Guide limitations
- The README illustrates the operation with example data; it does not provide guidance for integrating the proof into a smart contract.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 9 October 2026
- Original website title
- olivmath/merkly · Official homepage title · retained in its source language

