trytrie

Fast and memory efficient Trie implementation for Python


License
MIT
Install
pip install trytrie==1.2

Documentation

trytrie

Fast and memory efficient Trie for Python

Usage

from trytrie import Trie

trie = Trie()
trie["hello"] = "world"
trie["helly"] = "friend"

print(trie["hello"]) # world

for k in trie:
    print(k) # prints hello, helly

del trie["helly"]

print(trie.get("helly", "nothing")) # nothing

Installation

Python 3+ only

pip install trytrie