sqlite-fts4
Python functions for working with SQLite FTS4 search
Decision gist · record as of 2026-08-14
Yes, if you are already using SQLite FTS4 and need ranking functions—it is lightweight, dependency-free, and permissively licensed. However, the package is abandoned (last update 2022-07-30) and has no active maintenance, so expect no updates for bugs or compatibility issues with future Python versions. Suitable for stable, self-contained projects; risky for long-term production systems requiring ongoing support.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires an existing SQLite FTS4 table; the functions are SQL-side and work only with FTS4 indexed columns.
- Installation is straightforward with no runtime dependencies.
- The package has not been updated since 2022-07-30 and is marked abandoned, so expect no active maintenance or bug fixes.
License · maintenance · safety
Apache License, Version 2.0 (permissive) — Licensed under Apache License 2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions.
last release 2022-07-30 (1476 days) · last repo commit 2022-07-30 · 23 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,278,961 downloads/mo, #4,119 on PyPI
Alternatives
Verify before relying
import sqlite3
from sqlite_fts4 import register_functions
conn = sqlite3.connect(":memory:")
register_functions(conn)
# Now use rank_bm25(), rank_score(), decode_matchinfo(), or annotate_matchinfo() in SQL queries- Whether the package works correctly with current Python versions (support unspecified in metadata).
- Whether the BM25 implementation matches current Okapi BM25 specifications or has known deviations.
- Performance characteristics when used with large FTS4 indexes.
What it is and what it does
sqlite-fts4 is a Python module that registers custom SQL functions into SQLite to improve full-text search ranking and analysis. It provides four main functions: rank_score() implements a simple TF-IDF-based ranking, rank_bm25() implements the Okapi BM25 algorithm for relevance scoring, decode_matchinfo() converts SQLite's binary matchinfo output into human-readable JSON integers, and annotate_matchinfo() produces a verbose JSON structure explaining what each value in matchinfo means.
You use it by importing the module, calling register_functions() on a SQLite connection, and then invoking the functions in your FTS4 queries via SQL. It has no runtime dependencies and installs as a pure Python wheel, making it lightweight to add to projects that already use SQLite and FTS4 for search. The package is designed for developers building search features on top of SQLite's full-text indexing.
Use it for
- Rank full-text search results by relevance using BM25 scoring in a SQLite-backed application.
- Convert opaque SQLite matchinfo binary output into readable JSON for debugging or analysis.
- Implement TF-IDF-based document ranking without external search infrastructure.
- Annotate matchinfo results to understand how SQLite calculated match statistics for each query.
- Integrate search ranking into Datasette via the datasette-sqlite-fts4 plugin.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are already using SQLite FTS4 and need ranking functions—it is lightweight, dependency-free, and permissively licensed.
However, the package is abandoned (last update 2022-07-30) and has no active maintenance, so expect no updates for bugs or compatibility issues with future Python versions. Suitable for stable, self-contained projects; risky for long-term production systems requiring ongoing support.
Install
sqlite-fts4 on PyPI
Before you install
Installation is straightforward with no runtime dependencies. The package has not been updated since 2022-07-30 and is marked abandoned, so expect no active maintenance or bug fixes.
Requires an existing SQLite FTS4 table; the functions are SQL-side and work only with FTS4 indexed columns.
License in practice
Licensed under Apache License 2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions.
Quickstart
import sqlite3
from sqlite_fts4 import register_functions
conn = sqlite3.connect(":memory:")
register_functions(conn)
# Now use rank_bm25(), rank_score(), decode_matchinfo(), or annotate_matchinfo() in SQL queries
Verify before relying
- Whether the package works correctly with current Python versions (support unspecified in metadata).
- Whether the BM25 implementation matches current Okapi BM25 specifications or has known deviations.
- Performance characteristics when used with large FTS4 indexes.
Package facts
| License | Apache License, Version 2.0 permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 1,476 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,278,961 / month, #4,119 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: sqlite_fts4-1.0.3-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “sqlite fts4 ranking functions”
- sqlite-fts4Registers custom SQLite functions for ranking and analyzing FTS4…
- sqlite-vecsqlite-vec adds vector search capabilities to SQLite, enabling…
- sqlean.pyA drop-in replacement for Python's sqlite3 module that bundles sqlean…
Give your agent the search over MCP, or paste the wish link into any chat.
More Database packages
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also rank-bm25 · bm25s · sqlite-utils · sqlean.py · llama-index-retrievers-bm25 · syntaqlite · apache-airflow-providers-sqlite · FlashRank · anysqlite · pysqlite3