Typed Python client SDK for the Arcanada Model Connector — unified API for AI CLI agents and cloud model providers.
Project description
arcanada-model-connector
Typed Python client SDK for the Arcanada Model Connector — a unified API for AI CLI agents (Claude Code, Cursor, Gemini, Codex) and cloud model providers (OpenRouter, Groq, Grok, embedding services).
pip install arcanada-model-connector
Quick start
from arcanada_model_connector import Client
client = Client(api_key="arc_api_...")
response = client.execute({
"connector": "openrouter",
"prompt": "Explain BGE-M3 in 30 words.",
"model": "mistralai/mistral-small-3.2-24b-instruct",
})
print(response.result)
Async
import asyncio
from arcanada_model_connector import AsyncClient
async def main() -> None:
async with AsyncClient(api_key="arc_api_...") as client:
response = await client.execute({"connector": "openrouter", "prompt": "ping"})
print(response.result)
asyncio.run(main())
Structured output with output_format + schema
response = client.execute({
"connector": "openrouter",
"prompt": "Return a JSON object with keys 'city' and 'population'.",
"output_format": "json",
"schema": {
"type": "object",
"properties": {
"city": {"type": "string"},
"population": {"type": "integer"},
},
"required": ["city", "population"],
},
})
print(response.repair_report) # native | guarded | failed
print(response.structured)
repair_report.pass_ is one of:
native— provider returned valid output, no repair needed.guarded— output-guard middleware applied repair strategies successfully.failed— output-guard exhausted retries; raised asGuardExhaustedError.
Error handling
from arcanada_model_connector import ConnectorError, GuardExhaustedError, TimeoutError
try:
response = client.execute({"connector": "openrouter", "prompt": "..."})
except GuardExhaustedError as exc:
print("guard exhausted:", exc.envelope.message)
except ConnectorError as exc:
print(f"HTTP {exc.status}: {exc.envelope.type if exc.envelope else 'unknown'}")
if exc.retry_after:
print(f"retry after {exc.retry_after}s")
except TimeoutError as exc:
print("timed out after", exc.timeout, "seconds")
The SDK redacts Authorization headers and Bearer tokens from exc.cause before raising, so safe to log.
Documentation
License
MIT © Arcanada
Жизнь одного человека имеет значение / One human life matters
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 arcanada_model_connector-0.1.1.tar.gz.
File metadata
- Download URL: arcanada_model_connector-0.1.1.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30a678638672ce315e46fe333f85585e7ece15ff602db11c81ab3f7b4bfd7956
|
|
| MD5 |
4141d940e625f517d8159edaa223d016
|
|
| BLAKE2b-256 |
610c3dc82671f5031e7110fd0f1f2c9bddb5ba546362b2a42aa4d15c6ee87866
|
Provenance
The following attestation bundles were made for arcanada_model_connector-0.1.1.tar.gz:
Publisher:
publish-sdks.yml on Arcanada-one/model-connector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arcanada_model_connector-0.1.1.tar.gz -
Subject digest:
30a678638672ce315e46fe333f85585e7ece15ff602db11c81ab3f7b4bfd7956 - Sigstore transparency entry: 1523407784
- Sigstore integration time:
-
Permalink:
Arcanada-one/model-connector@7723f38a1d43ad5a017e297e9d54c4999705991a -
Branch / Tag:
refs/tags/sdk-v0.1.1 - Owner: https://github.com/Arcanada-one
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdks.yml@7723f38a1d43ad5a017e297e9d54c4999705991a -
Trigger Event:
push
-
Statement type:
File details
Details for the file arcanada_model_connector-0.1.1-py3-none-any.whl.
File metadata
- Download URL: arcanada_model_connector-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dffc6a9bc1a1437622c6f81ed674771d1529c7fd6a05b930a073f0e1ece43bb8
|
|
| MD5 |
7c485c90eca6687244bfd227037a4de5
|
|
| BLAKE2b-256 |
5d414b013ce5798ffcac373eb5a620c3aa86ce05ac38962cf6cfc06a55bddba3
|
Provenance
The following attestation bundles were made for arcanada_model_connector-0.1.1-py3-none-any.whl:
Publisher:
publish-sdks.yml on Arcanada-one/model-connector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arcanada_model_connector-0.1.1-py3-none-any.whl -
Subject digest:
dffc6a9bc1a1437622c6f81ed674771d1529c7fd6a05b930a073f0e1ece43bb8 - Sigstore transparency entry: 1523407791
- Sigstore integration time:
-
Permalink:
Arcanada-one/model-connector@7723f38a1d43ad5a017e297e9d54c4999705991a -
Branch / Tag:
refs/tags/sdk-v0.1.1 - Owner: https://github.com/Arcanada-one
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdks.yml@7723f38a1d43ad5a017e297e9d54c4999705991a -
Trigger Event:
push
-
Statement type: