Super-fast, efficiently stored Trie (prefix tree) for Python, written in C with Python bindings. Current version: 0.8.3 (released 2023). Development is stable with infrequent releases.
pip install datrieNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Create a Trie, insert key-value pairs, check membership, and prefix search.
Use Python 2.7 or >=3.4.
Ensure all keys are strings: e.g., str(key).
Migrate to Python 3.
Use a string prefix: trie.items('prefix').Run: pip install datrie
Convert key to string: trie[str(key)] = value
No dependency data recorded yet.