asu-sovereign — Official Python SDK for ASU Sovereign Workspace
Official type-safe Python client for querying the ASU Sovereign Workspace in Uganda.
📦 Installation
pip install asu-sovereign
🚀 Quick Start
1. Synchronous Client
from asu import AsuClient
client = AsuClient(
base_url="http://localhost:8000/api/v1",
api_key="your_sovereign_key",
org_tenant="moh.asu.ug"
)
# Stream token completions
stream = client.chat.stream(
model="llama-3.1-70b",
messages=[{"role": "user", "content": "Summarize Q3 URA tax bulletin."}],
)
for chunk in stream:
token = chunk.choices[0].get("delta", {}).get("content", "")
print(token, end="", flush=True)
2. Asynchronous Client (FastAPI / asyncio)
import asyncio
from asu import AsyncAsuClient
async def main():
client = AsyncAsuClient(base_url="http://localhost:8000/api/v1")
# Query Document Vault
result = await client.documents.query(
query="Luweero clinic intake trends in Q2",
workspace="health"
)
print(f"Grounded: {result.grounded}")
for cite in result.citations:
print(f"[{cite.citation_id}] Page {cite.page}: {cite.text}")
asyncio.run(main())
3. Upload & Ingest Documents
with open("MAAIF_Crop_Report_2024.pdf", "rb") as f:
upload = client.documents.upload(
file_obj=f,
filename="MAAIF_Crop_Report_2024.pdf",
classification="OFFICIAL // SENSITIVE"
)
print("Ingested Chunks:", upload.chunks_indexed)
print("SHA-256 Hash:", upload.sha256_checksum)
Metadata
Release files for asu-sovereign 1.0.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 | |
|---|---|---|---|---|
| asu_sovereign-1.0.0.tar.gz | 5.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| asu_sovereign-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.2 kB
Release files / asu_sovereign-1.0.0.tar.gz
| Download URL | asu_sovereign-1.0.0.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
40f39993b87d02b461d20941a64d0e311164c4ff0051c91f82054a84b5d80291
|
|
BLAKE2b-256 checksum How to use checksums |
a2b5a3a418e26ebc565316dbf09324f2d58ac33a66117dfe38c56619335a0dcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / asu_sovereign-1.0.0-py3-none-any.whl
| Download URL | asu_sovereign-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f53f381af73fe78cf7abbba29ad64f71992de4f5106a114873968578da066b6d
|
|
BLAKE2b-256 checksum How to use checksums |
f930cc3e0aece8053c253419a3b274350ae2eca12a3dea90e4e9680ba144fc96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Security for asu-sovereign 1.0.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.