Query Veritas Acta receipt DAGs with SQL. Built on DuckDB.
Project description
acta-sql
Query Veritas Acta receipt DAGs with SQL.
Flattens Veritas Acta receipt DAGs into queryable DuckDB tables. Built on DuckDB for blazing-fast local analytics. No server required.
Install
pip install acta-sql
CLI Usage
# Load receipts into a local DuckDB file
acta-sql load audit-bundle.json
# Query with SQL
acta-sql query "SELECT tool_name, COUNT(*) FROM receipts GROUP BY tool_name"
# Quick summary
acta-sql summary
Example output from acta-sql summary:
Receipts: 142
Denied: 7
Unique tools: 12
Time range: 2026-03-01T00:00:00Z to 2026-03-27T23:59:59Z
Python API
from acta_sql import load_receipts, create_db, query
receipts = load_receipts("audit-bundle.json")
db = create_db(receipts)
rows = query(db, "SELECT tool_name, decision, COUNT(*) as n FROM receipts GROUP BY tool_name, decision ORDER BY n DESC")
for row in rows:
print(row)
Database Schema
receipts
| Column | Type |
|---|---|
| id | VARCHAR (PK) |
| type | VARCHAR |
| tool_name | VARCHAR |
| decision | VARCHAR |
| agent_id | VARCHAR |
| issuer_id | VARCHAR |
| timestamp | VARCHAR |
| policy_hash | VARCHAR |
| signature | VARCHAR |
| raw_json | VARCHAR |
edges
| Column | Type |
|---|---|
| source_id | VARCHAR |
| target_id | VARCHAR |
| relation | VARCHAR |
payloads
| Column | Type |
|---|---|
| receipt_id | VARCHAR |
| key | VARCHAR |
| value | VARCHAR |
Supported Input Formats
.json— A JSON array of receipts, or an object with areceiptskey.jsonl— One receipt per line- Python
list[dict]— Pass directly tocreate_db()
License
MIT
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
acta_sql-0.1.0.tar.gz
(3.8 kB
view details)
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 acta_sql-0.1.0.tar.gz.
File metadata
- Download URL: acta_sql-0.1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3cd29251a33fcc6f3e89cb83b7d583cba6a933d2e96f1efd898bd9f82b61e6d1
|
|
| MD5 |
8ee628adac18110345e6748fe88ecd06
|
|
| BLAKE2b-256 |
363773d19960ade5b61ea1d632bbe0df295573d8008de528a7eb9e84e09fbbbf
|
File details
Details for the file acta_sql-0.1.0-py3-none-any.whl.
File metadata
- Download URL: acta_sql-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3591d9f1af61cf7a2aef58ad8baa6c4a0e451cd046beadacaa6ac6027ee26d5
|
|
| MD5 |
987044bba76df8496ddebb8cf24531d0
|
|
| BLAKE2b-256 |
6a05bd39277bc8f0f6a8ea91ff2d7035d57f08553d6093b0fad21f42526791db
|