pygtrie: Pure Python Trie Data Structure

JSON →
library 2.5.0 ·python
verified Jun 28, 2026 install

pygtrie is a pure Python library implementing a trie data structure. It provides `Trie`, `CharTrie`, and `StringTrie` classes, each implementing a mutable mapping (dictionary-like) interface. Its strengths lie in prefix-based operations, such as iterating over or deleting subtries, prefix checking, and shortest/longest prefix look-ups. It also includes a `PrefixSet` for managing sets of prefixes. The current version is 2.5.0, with releases occurring periodically to introduce features and address compatibility.

total hits 22
actors 7 distinct systems
last hit 3d ago AhrefsBot
GPTBot
4
Amazonbot
4
ByteDance
4
Script
1
Search engines
1
Humans
4

top countries 🇺🇸 United States · 🇸🇬 Singapore · 🇨🇦 Canada · 🇫🇷 France · PH