skillfed

sqltrie

SQL-based prefix tree inspired by pygtrie and python-diskcache

sqltrie v0.11.2 2.0M downloads/30d#3,408 on PyPI1
Permissive license Apache-2.0 DORMANT released

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 sqltrie

uv

uv add sqltrie

poetry

poetry add sqltrie

Installing 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

Development Status :: 1 - PlanningProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Tags

prefix tree SQL storagetrie database implementationSQL-based triepersistent prefix treetrie with SQL backend
data-structuresearly-stage

More Database packages