Classify SQLite text with TypeSafe Jev. Save answers and costs in a separate SQLite journal. Keep the source database unchanged. Each request contains one record and one or more Choice questions. Eight requests can run at the same time.
Use this instead of LLM when you need threshold-based abstention and a shared budget journal that survives process crashes.
Alpha. Python 3.10+. macOS and Linux only: the journal requires a Unix file lock. MIT license.
Version 0.1.0 is available on PyPI.
python -m pip install sqlite-utils-jevIf you already use sqlite-utils, run sqlite-utils install sqlite-utils-jev in its environment.
- Save tickets.csv and routing.json in your current directory.
- Set the
TYPESAFE_API_KEYenvironment variable. - Run these commands. Use a new database name.
sqlite-utils insert tickets.db tickets tickets.csv --csv --detect-types --pk id
sqlite-utils jev classify tickets.db tickets \
--key id --text subject --text body --question routing.json \
--state decisions.sqlite --budget-usd 0.01
sqlite-utils decisions.sqlite \
"select source_key, label, status from results order by source_key" --tableReal output from jev-1.13.0 on 29 September 2026:
source_key label status
------------ --------- --------
1 billing accepted
2 technical accepted
3 other accepted
4 unknown accepted
Four requests used 1,639 input tokens: $0.000068838 at the configured price.
unknown is a category in this question. It is not an abstention.
Answers can change between runs.
sqlite-utils jev classify tickets.db tickets \
--key id --text subject --text body --question routing.json \
--state decisions.sqlite --offline --min-confidence 0.50Defaults are 0.75 probability and 0.60 confidence. Both thresholds must pass.
Otherwise, the tool saves abstained and keeps the proposed label.
Thresholds depend on the workload. Test them on labeled records; scores do not establish accuracy.
Repeat the original command to resume. Use --questions for named questions.
sqlite-utils jev status decisions.sqliteThe example sends text to TypeSafe. Its one-cent allowance covers all runs that use this journal. Reservations survive crashes. The tool does not retry failed requests automatically. Actual charges can exceed the local estimate.
Defaults are jev-1.13.0 and $0.042 per million input tokens, checked on 29 September 2026.
Before paid work, check current pricing.
For another model, pass its fixed ID with --model and its rate with --input-price.
If the price changes, pass the new rate with --input-price.
See the reference for rate limits, file moves, retries and Python use. See verification for tests and live measurements.