Skip to main content

Merkle DAG Store

A local Merkle DAG store with content-addressable block storage in Python. Provides immutable, deterministic, block-addressed object storage with DAG linking, snapshotting, and garbage collection.

Features

  • Content Addressing: Multiple hash algorithms (SHA256, SHA512, BLAKE2b)
  • DAG Linking: Create parent-child relationships between blocks
  • Snapshotting: Tag and version DAG states for time-travel
  • Garbage Collection: Remove unreachable blocks from storage
  • Integrity Verification: Recursive DAG verification
  • DAG Traversal: BFS traversal to discover reachable blocks
  • SQLite Index: Efficient metadata indexing and access statistics
  • Sharded Storage: Filesystem sharding for performance at scale

Installation

pip install merkle-dag-store

Usage

from merkle_dag_store import MerkleDAGStore

store = MerkleDAGStore("./my_dag")

# Store blocks
cid1 = store.put(b"Hello, World!")
cid2 = store.put(b"Linked data")

# Create linked block
cid3 = store.put(b"Parent", links=[str(cid1), str(cid2)])

# Create snapshot
store.snapshot(str(cid3), tag="v1.0")

# Verify integrity
assert store.verify(str(cid3), recursive=True)

License

MIT

Metadata

Release files for merkle-dag-store 1.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 merkle-dag-store 1.0.0
File Size Uploaded Provenance
merkle_dag_store-1.0.0.tar.gz 6.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for merkle-dag-store 1.0.0
File Interpreter ABI Platform
merkle_dag_store-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.6 kB

Release files / merkle_dag_store-1.0.0.tar.gz

Download URL merkle_dag_store-1.0.0.tar.gz
Size 6.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7e51ad4086b0444c807a8e6e13c21c7d088897064cbe297b8bdd1223071cab97
BLAKE2b-256 checksum
How to use checksums
2d5424619622c2657d65da616508a951c9d3ad9e42450774a36ce54d303e170e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.6

Release files / merkle_dag_store-1.0.0-py3-none-any.whl

Download URL merkle_dag_store-1.0.0-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
64ccb0da26996c1c3cbdeed6410dd12c6b316b16615e26bc01c33d4ce733601f
BLAKE2b-256 checksum
How to use checksums
d52ac4625631cead8271d03b96336ddad03b300bcfb8c5c5437f17055d147686
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.6

Security for merkle-dag-store 1.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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

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