sqltrie
SQL-based prefix tree inspired by pygtrie and python-diskcache
What it is and what it does
SQLTrie is a Python library that implements a trie (prefix tree) data structure using SQL as its storage backend. It builds on ideas from pygtrie and python-diskcache, aiming to provide persistent, queryable prefix-tree functionality. The package depends on attrs, orjson, and pygtrie for its core operations.
The project is in early planning stages (Development Status :: 1 - Planning) and has been dormant since its last commit on 2023-12-22, with no documentation or feature list published. The published description contains only placeholder sections ('TODO'), so the actual API, performance characteristics, and use cases remain unclear from the available materials.
Use it for:
- Store and query large prefix trees that need to persist across application restarts using a SQL database.
- Build autocomplete or search-as-you-type systems where trie data is backed by persistent storage.
- Implement IP routing tables or domain name hierarchies with SQL-queryable trie structures.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
SQLTrie implements a prefix tree (trie) data structure backed by SQL, combining trie search capabilities with persistent database storage.
No. The package is in early planning, dormant since 2023-12-22, lacks any published documentation or feature examples, and carries no maintenance signal. While install friction is low and the license is permissive, the absence of a working feature list, active development, or user guidance makes it unsuitable for production use. Consider only if you are willing to debug and maintain the code yourself.
Install
sqltrie on PyPI
pip
pip install sqltrieuv
uv add sqltriepoetry
poetry add sqltrieInstalling sqltrie
Before you install
Low install friction with only three runtime dependencies (attrs, orjson, pygtrie). However, the project is dormant—last commit was 2023-12-22 and no updates in 541 days—so maintenance support is minimal.
License in practice
Licensed under Apache-2.0 (permissive), so you may use, modify, and distribute the package freely, including in commercial projects, provided you retain the license notice.
Quickstart
pip install sqltrie
import sqltrie
# Create and use a SQL-backed trie instance
# (specific API not documented in available materials)
Requires Python >= 3.8; the package is in early development (Development Status :: 1 - Planning) so API stability is not guaranteed.
Verify before relying
- What specific trie operations (insert, search, delete, prefix matching) does the API expose?
- What SQL backend(s) does it support (SQLite, PostgreSQL, etc.)?
- How does performance compare to in-memory tries or other SQL-backed data structures?
- Is the package actively maintained or seeking new maintainers?
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — attrs, orjson, pygtrie |
| Maintenance | dormant — 541 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,957,865/month — #3,408 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sqltrie-0.11.2-py3-none-any.whl
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
pygtriepygtrie provides pure Python implementations of…
permissive · top 5,000 on PyPI
trieImplements the Ethereum Merkle Trie data…
permissive · top 15,000 on PyPI
PyTriePyTrie provides a pure Python 3 trie data…
permissive · top 15,000 on PyPI
marisa-trieProvides memory-efficient trie data structures…
copyleft · top 5,000 on PyPI
dvc-dataProvides data storage and indexing abstractions…
permissive · top 5,000 on PyPI
cidr-trieStores and queries CIDR IP address blocks (IPv4…
permissive · top 15,000 on PyPI
py-radixImplements a radix tree data structure for…
permissive · top 15,000 on PyPI
retrieBuilds efficient Trie-based regex patterns for…
permissive · top 15,000 on PyPI
sqlitedictProvides a dict-like interface to SQLite…
permissive · top 5,000 on PyPI
historydictHistoryDict provides a persistent dictionary…
unclear · top 15,000 on PyPI