Skip to main content
Help us improve Python packaging – donate today!

Trie data structure implementation.

Project Description

pytrie is a Python library implementing a trie data structure.

Trie data structure, also known as radix or prefix tree, is an ordered tree associating keys to values where all the descendants of a node have a common prefix (associated with that node).

The trie module contains Trie, CharTrie and StringTrie classes each implementing a mutable mapping interface, i.e. interface of the dictionary. As such, in most circumstances, Trie could be used as a drop-in replacement for a dict. Obviously the prefix nature of the data structure is what gives it its strengths.

Features

  • A full mutable mapping implementation.
  • Supports iterating over as well as deleting a subtrie.
  • Supports prefix checking as well as shortest and longest prefix look-up.
  • Extensible for any kind of user-defined keys.

Version History

0.9: 2014/02/03

  • Initial release.

Release history Release notifications

History Node

2.2

History Node

2.1

History Node

2.0

History Node

1.2

History Node

1.1

History Node

1.0

History Node

0.9.3

History Node

0.9.2

This version
History Node

0.9.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pygtrie-0.9.1.tar.gz (11.1 kB) Copy SHA256 hash SHA256 Source None Feb 3, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page