trie
Python implementation of the Ethereum Trie structure
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and installs with low friction. Install it if you are working with Ethereum state structures, building blockchain tooling, or need a production-grade Merkle Trie implementation in Python.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a pure Python wheel.
- Active maintenance with recent commits and stable production status across Python 3.8–3.13.
License · maintenance · safety
MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
last release 2025-01-29 (562 days) · last repo commit 2026-07-16 · 111 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 313,511 downloads/mo, #7,712 on PyPI
Alternatives
Verify before relying
from trie import HexaryTrie
t = HexaryTrie(db={})
t.set(b'my-key', b'some-value')
value = t.get(b'my-key')
root = t.root_hash- Performance characteristics (insertion/lookup speed, memory overhead) for large tries
- Database backend compatibility beyond in-memory dict
- Concurrency or thread-safety guarantees
What it is and what it does
This package provides a Python implementation of the Hexary Trie, the data structure used by Ethereum for storing account state and transaction data. It supports standard key-value operations (set, get, delete, exists) and can be used like a Python dictionary. The trie maintains a cryptographic root hash that changes deterministically when data is modified, making it useful for verifying state consistency across distributed systems.
The package depends on eth-utils, hexbytes, rlp, sortedcontainers, and eth-hash to handle Ethereum-specific serialization, hashing, and data structures. It includes traversal APIs for inspecting internal trie structure and a fog-based walker for efficiently exploring large tries without loading all nodes into memory.
Use it for
- Building Ethereum client implementations or state verification tools that need to reconstruct and validate blockchain state
- Storing and querying hierarchical key-value data with cryptographic proofs of correctness
- Implementing smart contract state backends or local blockchain simulators
- Auditing or debugging Ethereum state by traversing trie structure and verifying node integrity
- Prototyping distributed ledger systems that require deterministic, hashable state trees
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and installs with low friction. Install it if you are working with Ethereum state structures, building blockchain tooling, or need a production-grade Merkle Trie implementation in Python.
Install
trie on PyPI
Before you install
Low install friction with a pure Python wheel. Active maintenance with recent commits and stable production status across Python 3.8–3.13.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
from trie import HexaryTrie
t = HexaryTrie(db={})
t.set(b'my-key', b'some-value')
value = t.get(b'my-key')
root = t.root_hash
Verify before relying
- Performance characteristics (insertion/lookup speed, memory overhead) for large tries
- Database backend compatibility beyond in-memory dict
- Concurrency or thread-safety guarantees
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4,>=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 5 packageseth-utilshexbytesrlpsortedcontainerseth-hash |
| Maintenance | Actively maintained 562 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 313,511 / month, #7,712 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: trie-3.1.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “ethereum trie implementation”
- trieImplements the Ethereum Merkle Trie data structure for efficient…
- eth-bloomImplements Ethereum's bloom filter algorithm for efficient membership…
- py-evmPy-EVM is a Python implementation of the Ethereum Virtual Machine…
Give your agent the search over MCP, or paste the wish link into any chat.
More Database packages
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also PyTrie · pygtrie · eth-bloom · sqltrie · marisa-trie · cidr-trie · py-radix · base58check · eth-rlp · hashring