skip to navigation
skip to content

TriePy 0.1.3

Simple Python Trie Data Structure

Latest Version: 0.2.1


A simple trie implementation in Python

This implementation utilizes a dictionary as its backing
data structure. Essentially, it is creating nested dictionaries.

>>> from trie import TriePy
>>> t = TriePy()
>>> t.addWord("dog")
>>> t.addWord("doggy")
>>> t.addWord("dogs")
>>> t.containsWord("dog")
>>> t.containsWord("dogg")
>>> t.root
{'d': {'o': {'g': {'!THIS_IS_THE_END!': {'word': 'dog'}, 's': {'!THIS_IS_THE_END!': {'word': 'dogs'}}, 'g': {'y': {'!THIS_IS_THE_END!': {'word': 'doggy'}}}}}}}

Unit Testing
nose is used for unit testing and simple unit tests
can be run with the following in the source trie directory:

You can install this as usual with ``.
`python install`

You can also install this via pip.
`pip install TriePy`

The usual "use virtualenv to test first" warnings apply.  
File Type Py Version Uploaded on Size
TriePy-0.1.3.tar.gz (md5) Source 2014-06-13 1KB
  • Downloads (All Versions):
  • 18 downloads in the last day
  • 81 downloads in the last week
  • 388 downloads in the last month