Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A pure Python implementation of the trie data structure.

Project Description

# pytrie

pytrie is a a pure Python (2 and 3) implementation of the trie data structure.

A _trie_ is an ordered tree data structure that is used to store a mapping where the keys are sequences, usually strings over an alphabet. In addition to implementing the mapping interface, tries allow finding the items for a given prefix, and vice versa, finding the items whose keys are prefixes of a given key.

pytrie runs on Python 2.7 and 3.x without modification. To install run:

pip install pytrie

Documentation is available at [Read the Docs](https://pytrie.readthedocs.io/).

## Changelog

### 0.3

  • Fixed bug for tries with zero-length keys.
  • Added __bool__ (__nonzero__) and __cmp__ methods to Trie.
  • Added sortedcontainers dependency.
  • Linting.
  • Converted from Mercurial to Git.

### 0.2

  • Initial Python 3 support (thanks Dmitrijs Milajevs)

### 0.1

  • Initial release
Release History

Release History

This version
History Node

0.3

History Node

0.2

History Node

0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
PyTrie-0.3.tar.gz (228.7 kB) Copy SHA256 Checksum SHA256 Source Dec 27, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting