6 Best Python Trie Data Structure Libraries

share link

by Dhiren Gala dot icon Updated: Feb 13, 2023

technology logo
technology logo

Guide Kit Guide Kit  

Here are the best open-source Python Trie data structure for your applications. You can use these libraries to build smartphone and web applications that efficiently store and search large collections of strings. 

 

Python Trie data structure libraries are an essential tool for many text-based applications. There are several libraries available in Python that provide Trie functionality such as spell-checking, auto-completion, and searching large text corpora. Certain libraries enable simple Trie implementation for Python, providing a basic set of operations for building and searching Tries. Also, some high-performance Trie libraries in Python support fast key lookups and memory-efficient storage. In addition to basic Trie functionality, Trie libraries also provide specialized functions like Trie-based spell-checking and auto-completion. Also, some libraries offer a Trie-based filter for text data. 

 

We have handpicked the top and tending open-source Python libraries that efficiently store and search extensive collections of strings in your applications. 

PyTrie:

  • Used to implement the mapping interface, usually strings over an alphabet.
  • Offers a pure Python 3 implementation of a Trie data structure. 
  • Supports the standard operations of a Trie, such as insert, search, and delete. 
  • Optimized for memory usage and performance.

pytrieby gsakkis

Python doticonstar image 18 doticonVersion:Currentdoticon
License: Others (Non-SPDX)

Support
    Quality
      Security
        License
          Reuse

            pytrieby gsakkis

            Python doticon star image 18 doticonVersion:Currentdoticon License: Others (Non-SPDX)

            Support
              Quality
                Security
                  License
                    Reuse

                      Marisa-Trie:

                      • Used in Artificial Intelligence, Natural Language Processing applications.
                      • It is a high-performance Trie library for Python.
                      • Supports fast key lookups and memory-efficient storage.
                      • Provides a compact binary format for serializing Tries.

                      marisa-trieby pytries

                      Python doticonstar image 971 doticonVersion:0.8.0doticon
                      License: Permissive (MIT)

                      Static memory-efficient Trie-like structures for Python (2.x and 3.x) based on marisa-trie C++ library.

                      Support
                        Quality
                          Security
                            License
                              Reuse

                                marisa-trieby pytries

                                Python doticon star image 971 doticonVersion:0.8.0doticon License: Permissive (MIT)

                                Static memory-efficient Trie-like structures for Python (2.x and 3.x) based on marisa-trie C++ library.
                                Support
                                  Quality
                                    Security
                                      License
                                        Reuse

                                          datrie:

                                          • Used for its fast, efficiently stored Trie function for Python.
                                          • Based on the Double-Array Trie structure and uses libraries.
                                          • Supports Unicode strings, efficient memory usage, and fast key lookups.

                                          datrieby pytries

                                          Python doticonstar image 511 doticonVersion:Currentdoticon
                                          License: Weak Copyleft (LGPL-2.1)

                                          Fast, efficiently stored Trie for Python. Uses libdatrie.

                                          Support
                                            Quality
                                              Security
                                                License
                                                  Reuse

                                                    datrieby pytries

                                                    Python doticon star image 511 doticonVersion:Currentdoticon License: Weak Copyleft (LGPL-2.1)

                                                    Fast, efficiently stored Trie for Python. Uses libdatrie.
                                                    Support
                                                      Quality
                                                        Security
                                                          License
                                                            Reuse

                                                              TriePy:

                                                              • Used for its easy to implement and understand Python Tri functions.
                                                              • It’s a simple Trie implementation for Python.
                                                              • Provides a basic set of operations for building and searching Tries. 

                                                              triepyby ahmednooor

                                                              Python doticonstar image 0 doticonVersion:Currentdoticon
                                                              License: Permissive (MIT)

                                                              A Python Class to implement a Trie data structure for a list of words.

                                                              Support
                                                                Quality
                                                                  Security
                                                                    License
                                                                      Reuse

                                                                        triepyby ahmednooor

                                                                        Python doticon star image 0 doticonVersion:Currentdoticon License: Permissive (MIT)

                                                                        A Python Class to implement a Trie data structure for a list of words.
                                                                        Support
                                                                          Quality
                                                                            Security
                                                                              License
                                                                                Reuse

                                                                                  Trie-Dictionary:

                                                                                  • Used for its dictionary-like interface.
                                                                                  • Supports fast key lookups, efficient memory usage,
                                                                                  • Provides a compact binary format for serializing Tries.

                                                                                  trie-dictionaryby jeff00seattle

                                                                                  Python doticonstar image 0 doticonVersion:Currentdoticon
                                                                                  no licences License: No License (null)

                                                                                  Trie Dictionary Lookup

                                                                                  Support
                                                                                    Quality
                                                                                      Security
                                                                                        License
                                                                                          Reuse

                                                                                            trie-dictionaryby jeff00seattle

                                                                                            Python doticon star image 0 doticonVersion:Currentdoticonno licences License: No License

                                                                                            Trie Dictionary Lookup
                                                                                            Support
                                                                                              Quality
                                                                                                Security
                                                                                                  License
                                                                                                    Reuse

                                                                                                      PyDawg:

                                                                                                      Used for Directed Acyclic Word Graph (DAWG) data structure.

                                                                                                      Provides fast key lookups, memory-efficient storage,

                                                                                                      Offers a compact binary format for serializing Tries.

                                                                                                      pyDAWGby WojciechMula

                                                                                                      C doticonstar image 15 doticonVersion:Currentdoticon
                                                                                                      License: Others (Non-SPDX)

                                                                                                      Python module (C extension and plain python) implementing DAWG

                                                                                                      Support
                                                                                                        Quality
                                                                                                          Security
                                                                                                            License
                                                                                                              Reuse

                                                                                                                pyDAWGby WojciechMula

                                                                                                                C doticon star image 15 doticonVersion:Currentdoticon License: Others (Non-SPDX)

                                                                                                                Python module (C extension and plain python) implementing DAWG
                                                                                                                Support
                                                                                                                  Quality
                                                                                                                    Security
                                                                                                                      License
                                                                                                                        Reuse

                                                                                                                          See similar Kits and Libraries