Python client and CLI for SAS - Symbiotic Autoprotection System.
Project description
sas-client
Python client and CLI for SAS - Symbiotic Autoprotection System.
SAS is a structural coherence audit API for generative AI outputs. It exposes operational endpoints for hallucination / semantic rupture detection using the κD = 0.56 threshold.
- Public API: https://sas-api.onrender.com
- API docs: https://sas-api.onrender.com/docs
- Main repository: https://github.com/Leesintheblindmonk1999/SAS
- Landing page: https://leesintheblindmonk1999.github.io/sas-landing/
- Zenodo DOI: https://doi.org/10.5281/zenodo.19702379
Install
pip install sas-client
For local development from source:
pip install -e .[dev]
Quick Start
from sas_client import SASClient
client = SASClient(api_key="sas_test_key_2026")
result = client.diff(
text_a="Python is a programming language used for data analysis.",
text_b="A python is a large tropical snake."
)
print(result["isi"])
print(result["verdict"])
print(result.get("evidence", {}).get("fired_modules"))
API Key
The hosted SAS API expects an API key for protected endpoints.
client = SASClient(api_key="sas_test_key_2026")
Or use an environment variable:
export SAS_API_KEY="sas_test_key_2026"
Windows PowerShell:
$env:SAS_API_KEY="sas_test_key_2026"
Usage
Health
from sas_client import SASClient
client = SASClient()
print(client.health())
Audit one text
from sas_client import SASClient
client = SASClient(api_key="sas_test_key_2026")
result = client.audit(
"Paris is the capital of France. The Eiffel Tower is located in Berlin."
)
print(result)
Compare two texts
from sas_client import SASClient
client = SASClient(api_key="sas_test_key_2026")
result = client.diff(
text_a="Python is a programming language commonly used for automation.",
text_b="A python is a large tropical snake."
)
print(result["isi"])
print(result["verdict"])
Public stats
from sas_client import SASClient
client = SASClient()
print(client.public_stats())
print(client.public_activity(limit=10))
CLI
After installation, the sas command is available.
sas health
sas public-stats
sas public-activity --limit 10
sas audit "Paris is the capital of France. The Eiffel Tower is located in Berlin." --api-key sas_test_key_2026
sas diff "Python is a programming language." "A python is a snake." --api-key sas_test_key_2026
Override the API URL:
sas --base-url https://your-sas-instance.example.com health
Privacy
This client does not collect telemetry.
Requests are sent only to the configured SAS API base URL.
License
GPL-3.0 + Durante Invariance License.
The SAS framework and κD = 0.56 require attribution to Gonzalo Emir Durante and citation of the public SAS repository / DOI when used for semantic invariance, hallucination detection, or similar structural coherence auditing purposes.
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 sas_client-0.1.0.tar.gz.
File metadata
- Download URL: sas_client-0.1.0.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20215ab0992175dc5d858af13585d8169fbfff2db9c8e4a27b98ec6698bc1997
|
|
| MD5 |
bddbf0976ebb5e19cd77e9e1bae39d7d
|
|
| BLAKE2b-256 |
2dc8a4dcf91e0d1200e7cd579cb8623aa1c9ac6e243f121aa9eb3b32fa4b8746
|
File details
Details for the file sas_client-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sas_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2718bdd9aba4a93cec2071f34cf1fde6eedbac98838f5e339014bf21110a6b4
|
|
| MD5 |
77a0b82fa2dcf7443162a16409d802f6
|
|
| BLAKE2b-256 |
6cbd21f7681f726fb4e4a746c98159c7b0d2d9fbcbbc8a966947a96f5b065fdb
|