Typed JSONL records with SQLite, FTS5, and built-in local embeddings.
Project description
JsonIBase
Typed JSONL records with derived SQLite, FTS5, and built-in local embeddings.
JsonIBase turns local JSONL source files into a validated, searchable record base. JSONL is the source of truth. SQLite is the derived local index.
Features
- Pydantic-backed collection specs for typed JSONL records.
- Canonical JSONL reads and transactional source mutations.
- Derived SQLite index with FTS5 lexical search.
- Bundled Model2Vec embedding provider for local vector and hybrid search.
- Validation for duplicate ids, schema errors, and relationships.
- JSON-only CLI designed for agents and scripts.
- No hosted service, database server, or network call required for normal use.
Install
pip install jsonibase
Requires Python 3.13 or newer.
For development from a source checkout:
uv sync --extra dev
uv run pytest
uv run jsonibase guide
Quickstart
from pydantic import BaseModel
from jsonibase import CollectionSpec, JsonIBase
class Standard(BaseModel):
id: str
title: str
body: str
status: str
standards = CollectionSpec[Standard](
name="standards",
path="data/standards.jsonl",
model=Standard,
fts_fields=["title", "body"],
embedding_fields=["title", "body"],
filter_fields=["status"],
)
store = JsonIBase.open(".", [standards])
store.init()
store.add(
"standards",
Standard(
id="std_001",
title="Managed services",
body="Prefer managed services.",
status="active",
),
)
results = store.search("standards", "managed services")
print(results[0].record_id)
CLI
The CLI returns one pretty-printed JSON envelope per command. The guide is machine-readable and intended to bootstrap agents like Codex:
jsonibase guide
Common workflow:
jsonibase init --root . --collection standards --path data/standards.jsonl --fts title --fts body
jsonibase validate --root . --collection standards --path data/standards.jsonl --fts title --fts body
jsonibase build --root . --collection standards --path data/standards.jsonl --fts title --fts body
jsonibase search --root . --collection standards --path data/standards.jsonl --fts title --fts body --query "managed services"
In a source checkout, prefix commands with uv run.
Boundaries
JsonIBase is VCS-neutral. Git workflows are external. The library does not inspect Git state, create commits, create branches, open pull requests, call GitHub APIs, or provide Git adapters.
Embeddings
The standard package includes a bundled Model2Vec resource manifest and default
local embedding provider. The provider performs no network calls during normal
operation. Applications can pass a custom provider to JsonIBase.open when
they need a domain-specific model or want to disable semantic behavior in their
own wrapper.
Internet Ingestion Examples
Additional examples ingest public structured sources:
examples/ingest_peps.pyfor Python PEP metadata.examples/ingest_cisa_kev.pyfor CISA Known Exploited Vulnerabilities.examples/ingest_rfc_index.pyfor the RFC Editor XML index.
See docs/ingestion-sources.md for the source catalog and run commands.
Development
uv sync --extra dev
uv run ruff check src tests scripts
uv run pyright
uv run python scripts/verify_model_manifest.py
uv run pytest
uv run python -m build
uv run twine check dist/*
Releasing
JsonIBase uses PyPI trusted publishing through
.github/workflows/publish.yml. The PyPI publisher must be configured for:
- Repository:
ThomasRohde/jsonibase - Workflow:
publish.yml - Environment:
pypi
Cut a release from a clean tree:
python scripts/release.py 0.1.0
git push origin master v0.1.0
The tag triggers GitHub Actions to build, check, upload to PyPI, and create a GitHub Release. After the release, open the next development cycle:
python scripts/release.py --post-release 0.2.0.dev0
git push origin master
License
MIT. The bundled potion-base-8M model declares MIT licensing in
its model card and is hash-pinned in MODEL-MANIFEST.json.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jsonibase-0.1.0.tar.gz.
File metadata
- Download URL: jsonibase-0.1.0.tar.gz
- Upload date:
- Size: 28.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38786327200f7e4684c707d13cb0a92df7bfacc5ea7ab43bbab09761ab1612b9
|
|
| MD5 |
7854cbe74bf8d9f8948431c374122231
|
|
| BLAKE2b-256 |
6f04bd8c38121132b8725796593131ce0db08d75484e4c42d637dbbf5340b743
|
Provenance
The following attestation bundles were made for jsonibase-0.1.0.tar.gz:
Publisher:
publish.yml on ThomasRohde/jsonibase
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jsonibase-0.1.0.tar.gz -
Subject digest:
38786327200f7e4684c707d13cb0a92df7bfacc5ea7ab43bbab09761ab1612b9 - Sigstore transparency entry: 1522735787
- Sigstore integration time:
-
Permalink:
ThomasRohde/jsonibase@95ae93e3406130811cbdad9f9018c8f47e176f81 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ThomasRohde
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@95ae93e3406130811cbdad9f9018c8f47e176f81 -
Trigger Event:
push
-
Statement type:
File details
Details for the file jsonibase-0.1.0-py3-none-any.whl.
File metadata
- Download URL: jsonibase-0.1.0-py3-none-any.whl
- Upload date:
- Size: 28.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f40866bfb6437ab18a03422922e3f16f980af680f73cfe6633e788e51143b2f
|
|
| MD5 |
79cb718315fee725b0a96d68c80ba3a8
|
|
| BLAKE2b-256 |
fc8206795f177834268a50dc968c6fc46ba1f225b8f1a2f51f88c1d78977ac40
|
Provenance
The following attestation bundles were made for jsonibase-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on ThomasRohde/jsonibase
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jsonibase-0.1.0-py3-none-any.whl -
Subject digest:
1f40866bfb6437ab18a03422922e3f16f980af680f73cfe6633e788e51143b2f - Sigstore transparency entry: 1522735815
- Sigstore integration time:
-
Permalink:
ThomasRohde/jsonibase@95ae93e3406130811cbdad9f9018c8f47e176f81 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/ThomasRohde
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@95ae93e3406130811cbdad9f9018c8f47e176f81 -
Trigger Event:
push
-
Statement type: