bonito-store
The persistence layer of Bonito (BON-002). Stores exactly what Prometheus
can't: query texts, execution plans, lock events, session snapshots and
table stats in a single SQLite file. Receives JSON events from
bonito-collector via POST /events.
Quickstart
uv pip install -e bonito-store
bonito-store serve --db bonito.db # FastAPI on :8000
curl -X POST localhost:8000/events -H 'Content-Type: application/json' \
-d @examples/events.sample.json
curl localhost:8000/baselines # 7-day mean + p95 per fingerprint
bonito-store prune # apply retention
Config
| Variable | Default | Description |
|---|---|---|
BONITO_DB |
bonito.db |
SQLite file path |
BONITO_STORE_PORT |
8000 |
HTTP port |
BONITO_RETENTION_DAYS |
7 |
Retention window (pruned in background) |
Endpoints
POST /events— ingest a collector snapshot (batch capped at 100 per type)POST /plans— ingest execution plan records (stored as JSON)GET /baselines?fingerprint=...&days=7— rolling mean + p95 per queryGET /health
Design
- Dedupe:
query_textsis keyed byfingerprint(sha256 of the minified query). Same query updates stats instead of creating a new row. - Baselines: each observation is appended to
query_samples; baselines are computed on the fly over the last N days (mean + p95). - Retention:
lock_events,session_snapshots,execution_plans,query_samplesandtable_statsare pruned pastBONITO_RETENTION_DAYS. Identity tables (query_texts) keep the latest stats forever. - Plans: stored as raw JSON (
EXPLAINoutput) — never interpolated into prompts without truncation (LLM token governance).
Metadata
Release files for bonito-store 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| bonito_store-0.2.0.tar.gz | 10.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bonito_store-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.6 kB
Release files / bonito_store-0.2.0.tar.gz
| Download URL | bonito_store-0.2.0.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06f0766558cf10067101fb9f8d225217aee16de611ccd79f88e7e0d77043f2b8
|
|
BLAKE2b-256 checksum How to use checksums |
f7cb5ac07cd2f926db27e8a8a6feb59cdbcf17d7c810d1cdf5abf184ef090fdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.17
|
Release files / bonito_store-0.2.0-py3-none-any.whl
| Download URL | bonito_store-0.2.0-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f4a29bfa35850f4cefdb1f01a7fe01e04555579ca18e673b9b4387d9de720d54
|
|
BLAKE2b-256 checksum How to use checksums |
41223bf200096d22c838352afc710526741228695f3eb60c18b91fad1c8f1d60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.17
|
Security for bonito-store 0.2.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.