Skip to main content

sqai

SQAI (Structured Query AI) — the deterministic, read-only structured-data SDK for AI agents, with full provenance. Python twin of @thyn-ai/sqai: same vocabulary, same error codes, same golden numbers, byte-identical cross-language hashes.

from sqai import create_sqai

sq = create_sqai()  # zero-config: SQAI_DEPLOYMENT_URL -> private deployment, else local
sq.connect([
    {"region": "east", "revenue": 1200.50},
    {"region": "west", "revenue": 900.25},
    {"region": "east", "revenue": 930.00},
], name="sales")

# Query plane — in-process, no key
outcome = sq.ask({"metric": "revenue", "aggregation": "sum",
                  "group_by": "region", "source_name": "sales"})

# Compute plane — one of 6,084 read-only capabilities; same value + hashes as TypeScript
# Requires a free SQAI login first: `sqai login`
result = sq.compute(module="finance", function="npv", args=[0.1, [-1000, 300, 420, 560, 680]])
print(result["value"], result["computation_hash"])
# 505.020148896933 b74f67d0d7a594aa7ac91f6291612452aa8ccdf603351ebc8d801a6fddd91bc8
  • Query plane — connect / resolve / query / verify / ask, in-process, no daemon or key.
  • Compute plane — validated against the embedded capability contract, dispatched to the managed runtime (it provisions once, then stays warm — no per-query cold start); results pass through verbatim with a determinism envelope (invocation_hash before execution, computation_hash after).
  • Policy — allow-lists for sources, fields, and functions; the surface is read-only and replayable by construction, and policy can only narrow it.
  • Errors — engine codes pass through verbatim (source="engine"); SQAI codes share the same snake_case vocabulary (source="sqai"). Messages never leak absolute paths.

The unsafe escape hatch (from sqai.unsafe import get_unsafe_runtime) bypasses every guarantee above and is deliberately not exported from the package root.

Apache-2.0.

Release files for sqai 0.1.20

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sqai 0.1.20
File Size Uploaded
sqai-0.1.20.tar.gz 349.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sqai 0.1.20
File Interpreter ABI Platform
sqai-0.1.20-py3-none-any.whl Python 3 none any Details

Total release size: 699.2 kB

Release files / sqai-0.1.20.tar.gz

Download URL sqai-0.1.20.tar.gz
Size 349.1 kB
Tags Source
SHA-256 checksum
How to use checksums
14759606fbb1a7766bfd027d9f400f1a87c46ac5840dd883464ccf67ab782d31
BLAKE2b-256 checksum
How to use checksums
b5a2a5df83af49a9749eb3079239c0f81cffc9a385685a0c75184a0981adf487
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / sqai-0.1.20-py3-none-any.whl

Download URL sqai-0.1.20-py3-none-any.whl
Size 350.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f2c336320c4c65265a68ca0fac85f04973566c721957d2ad21d7b4fb7de4b1dc
BLAKE2b-256 checksum
How to use checksums
75f8be44fd682ca096c7c8423d47552c03f22f6451cc4229ff996553bc7fc751
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

0.1.20 This release

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page