suffix-trees
Suffix trees, generalized suffix trees and string processing methods
What it is and what it does
suffix-trees provides a Python implementation of suffix trees and generalized suffix trees, which are data structures that enable fast substring searching and pattern matching. You create a tree from a string or list of strings, then query it to find substrings, locate all occurrences of a pattern, or compute properties like the longest common substring across multiple strings.
The package is classified as Alpha and has been unmaintained since 2020. It has no external runtime dependencies, making installation simple, but its abandonment means there will be no fixes for compatibility issues with newer Python versions or performance improvements. It is suitable for educational purposes or as a reference implementation, but production use should consider whether the lack of maintenance poses a risk for your use case.
Use it for:
- Find all occurrences of a substring within a text string using the find_all method.
- Compute the longest common substring across multiple strings using generalized suffix trees.
- Build a suffix tree index for repeated substring searches on a fixed text.
- Implement text processing algorithms that rely on efficient substring matching.
- Educational exploration of suffix tree data structures and their applications.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Implements suffix trees and generalized suffix trees in Python, providing data structures for efficient string searching and pattern matching with methods for common applications like longest common substring detection.
Yes, if you need a reference implementation for learning suffix trees or have a simple, non-critical use case for substring matching. No, if you require active maintenance or production-grade performance guarantees. The package works but is abandoned, so evaluate whether its lack of updates aligns with your project's stability requirements.
Install
suffix-trees on PyPI
pip
pip install suffix-treesuv
uv add suffix-treespoetry
poetry add suffix-treesInstalling suffix-trees
Before you install
Installation is straightforward with no runtime dependencies, but the package is abandoned as of 2020 with no recent maintenance. The repository is archived and the last commit was 2020-08-05, so expect no bug fixes or compatibility updates.
License in practice
Licensed under MIT, a permissive license that allows free use, modification, and distribution with minimal restrictions, making it safe to use in most projects.
Quickstart
pip install suffix-trees
from suffix_trees import STree
st = STree.STree("abcdefghab")
print(st.find("abc")) # 0
print(st.find_all("ab")) # [0, 8]
Verify before relying
- Whether the implementation handles edge cases and large datasets efficiently.
- Compatibility with Python versions beyond 3.8, given the package is abandoned.
- Performance characteristics and memory usage for typical use cases.
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,317 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 90,566/month — #13,575 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: suffix_trees-0.3.0-py3-none-any.whl
Tags
More Text Processing packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyparsingpyparsing provides a library for building text…
permissive · top 1,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
RapidFuzzRapidFuzz provides fast fuzzy string matching…
permissive · top 1,000 on PyPI
tinycss2tinycss2 parses CSS strings into token and…
permissive · top 1,000 on PyPI
llama-parseLlamaParse parses complex documents (PDFs,…
permissive · top 1,000 on PyPI
strsimpyImplements a dozen string similarity and…
permissive · top 15,000 on PyPI
pylcsComputes longest common subsequence, longest…
permissive · top 15,000 on PyPI
ahocorapyahocorapy implements the Aho-Corasick algorithm…
permissive · top 15,000 on PyPI
pfzyProvides fuzzy string matching with match…
permissive · top 5,000 on PyPI
greeneryParses and manipulates regular expressions by…
permissive · top 15,000 on PyPI
DistanceComputes distance metrics (Levenshtein,…
copyleft · top 15,000 on PyPI
stringzillaStringZilla provides SIMD and SWAR-accelerated…
permissive · top 5,000 on PyPI
red-black-tree-modProvides Python implementations of red-black…
permissive · top 5,000 on PyPI
retrieBuilds efficient Trie-based regex patterns for…
permissive · top 15,000 on PyPI
treelibProvides a simple tree data structure…
permissive · top 5,000 on PyPI