FathomDB
Python SDK for FathomDB — a local-first, embedded retrieval engine for application and agent workloads, built on SQLite.
A FathomDB database is a single file on your disk. There is no server, no daemon and no network call: you open a path and you have hybrid full-text + vector search over your own data, in your own process.
Status: pre-1.0, beta
The 0.8.x line is under active development. The public surface can change between minor releases, and scale/stability guarantees are staged for 0.9.x and later.
Install
pip install fathomdb
Requires Python 3.10 or newer. Wheels are abi3, so one wheel per platform serves every supported
interpreter. The package is a PyO3 binding to the FathomDB Rust engine and has no Python
dependencies of its own.
Quick start
from fathomdb import Engine
engine = Engine.open("./app.sqlite")
engine.write([
{
"kind": "doc",
"body": "the quick brown fox",
# Provenance is MANDATORY on every canonical row: source_id is the
# axis erase_source() erases on, so a row without one is unerasable.
"source_id": "import-2026-07",
}
])
result = engine.search("brown fox")
for hit in result.results:
print(hit.id, hit.kind)
engine.close()
What is on the surface
- Engine lifecycle —
Engine.open,engine.close,engine.drain,engine.counters(),engine.open_report(), and a logging-subscriber seam. - Writes —
engine.write(batch)of canonical nodes ({"kind", "body", "source_id", "logical_id"?, "state"?, "reason"?, "valid_from"?, "valid_until"?}) and edges ({"edge": {"kind", "from", "to", "source_id"}}). - Search —
engine.search(query, ...)fuses FTS5 lexical retrieval with dense vector retrieval, with optional cross-encoder reranking, JSON filters, and an opt-in explain sidecar. Asoft_fallbackfield reports when a branch could not contribute, rather than degrading silently. - Reads — the
fathomdb.readmodule:read.get,read.get_many,read.list,read.collection,read.mutations,read.projections,read.crossed_boundary_since. Each takes aReadViewselecting existence state and world-time validity. - Graph —
fathomdb.graph.neighborsandfathomdb.graph.search_expandfor bounded BFS expansion from search hits. - Record lifecycle —
engine.transition,engine.purge,engine.erase_source. - Projections —
engine.configure_projections, declaring which fields are filterable, searchable or rankable. The engine owns every derived index; you never maintain one by hand. - Typed errors — a single-rooted hierarchy under
fathomdb.errors.EngineErrorwith typed payload attributes, so you branch onDatabaseLockedErrororEmbedderNotConfiguredErrorinstead of parsing message strings.
Embeddings
Vector search needs vectors. Engine.open(path, use_default_embedder=True) opts into the engine's
pinned default embedder; on first use the weights are downloaded and cached under
~/.cache/fathomdb/embedders/. The default is False — a plain Engine.open performs no network
access at all, and vector writes then raise EmbedderNotConfiguredError rather than quietly doing
nothing.
Erasing data
Every canonical row carries a source_id, and that is deliberate: it is what makes the row
erasable. engine.erase_source(source_id) removes every row written under that provenance together
with its full-text, vector and secondary-index shadows, and finishes the erasure at rest.
engine.purge(logical_id) does the same for a single governed record. Both are idempotent, so an
interrupted erasure obligation can simply be retried.
Other SDKs
The same engine is available as a Rust crate (fathomdb) and
a Node.js package (npm install fathomdb).
Building from source
From a checkout of the repository:
pip install -e src/python/
License
MIT. See the LICENSE file shipped in this distribution.
Source, issues and full documentation: https://github.com/coreyt/fathomdb
Metadata
Release files for fathomdb 0.8.23
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| fathomdb-0.8.23-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| fathomdb-0.8.23-cp310-abi3-manylinux_2_28_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.28+ x86-64 | Details |
| fathomdb-0.8.23-cp310-abi3-manylinux_2_28_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.28+ ARM64 | Details |
| fathomdb-0.8.23-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
| fathomdb-0.8.23-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 31.7 MB
Release files / fathomdb-0.8.23-cp310-abi3-win_amd64.whl
| Download URL | fathomdb-0.8.23-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 5.5 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
065486f16b3fa59173dca45eb7ed42734e06ce1d3fbaf3162a075aa1fd35fdc7
|
|
BLAKE2b-256 checksum How to use checksums |
24cd63cbc719bed355368adf29f0e884fdc791d2a9b7f1643c13e2e5b35fcc99
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.
Transparency logRelease files / fathomdb-0.8.23-cp310-abi3-manylinux_2_28_x86_64.whl
| Download URL | fathomdb-0.8.23-cp310-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 8.3 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
d2e357185d8dee4f3811eeab1e4063c57704bfe39dff7273d372bc18695c163f
|
|
BLAKE2b-256 checksum How to use checksums |
1d0df8625720d3903501cc997671aa9381e79b71350470ffd9e7cf5e100e6291
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.
Transparency logRelease files / fathomdb-0.8.23-cp310-abi3-manylinux_2_28_aarch64.whl
| Download URL | fathomdb-0.8.23-cp310-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 6.3 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
5efa1ce4dff8af2ee5e947fce3cbb94fc6029c5cfc32bf66dd72db3cca3ceccf
|
|
BLAKE2b-256 checksum How to use checksums |
b4b8f957f4d84b401afbb135a19048b2fecf7cb4a6d40019b14db2bee8938dcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.
Transparency logRelease files / fathomdb-0.8.23-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | fathomdb-0.8.23-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 5.6 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
90669dfafd9c1a95738c67a3680f861d11df83c29a9089cd03cc821b684920c2
|
|
BLAKE2b-256 checksum How to use checksums |
c27304abfc06b6ea6617010e96ddde9e21d8cb70b3e17a0729d2ed43d62bc200
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.
Transparency logRelease files / fathomdb-0.8.23-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | fathomdb-0.8.23-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 5.9 MB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
22cec030aa1d985bd9f99430c621bd67d700858f864dcaa38bb33ec113d58fcb
|
|
BLAKE2b-256 checksum How to use checksums |
c28bf0e74fb824d73488549c70797b8e37de2b4ce5b84fae7200ee8482e9d32d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 21, 2026.
Transparency log