artasupport Python SDK
artasupport is a Python SDK for ArtaSupport TSE APIs (copilot and batch).
Requirements
- Python
3.10+ - An API key (
arta_live_...) - Backend base URL (
https://artasupport.comor for local testinghttp://localhost:8000)
Install
pip install artasupport
Local development install:
pip install -e .
Environment setup
export ARTASUPPORT_API_KEY="arta_live_..."
export ARTASUPPORT_BASE_URL="http://localhost:8000"
You can also pass api_key= and base_url= directly in code.
How it works
Each SDK call:
- Builds auth headers (
x-api-key+ Bearer) - Sends request to backend (
/api/tse,/v1/models,/v1/sessions,/api/ingest) - Parses typed response (
text,session_id,usage,next_steps, etc.) - Raises typed exceptions for API/network/config errors
Usage mode 1: Quick one-shot calls
Use top-level helper functions for simple scripts.
from artasupport import tse_copilot, tse_batch
response = tse_copilot(user_input="my machine is slow")
print(response.text)
response = tse_batch(user_input="cannot connect to the Internet")
print(response.text)
Usage mode 2: Sync conversation with context
Use ArtaSupportMessage when you want multi-turn chat.
Conversation context is tied to session_id.
from artasupport import ArtaSupportMessage
with ArtaSupportMessage() as client:
sid = client.create_session().session_id
response_1 = client.tse_copilot(user_input="internet is slow", session_id=sid)
response_2 = client.tse_copilot(user_input="only my laptop at home is affected", session_id=sid)
print(response_1.text)
print(response_2.text)
# optional cleanup
client.delete_session(sid)
Usage mode 3: Async conversation
Use AsyncArtaSupportMessage in async apps.
import asyncio
from artasupport import AsyncArtaSupportMessage
async def main():
async with AsyncArtaSupportMessage() as client:
sid = (await client.create_session()).session_id
response = await client.tse_batch(user_input="summarize issue", session_id=sid)
print(response.text)
asyncio.run(main())
AsyncArtaSupportMessage is non-blocking async I/O, not token streaming.
Usage mode 4: File ingestion
Upload PDF or Excel files for runbook extraction and cases ingestion.
from artasupport import tse_ingest
# Quick one-shot upload
response = tse_ingest("doc.pdf")
print(response.status) # "completed" or "processing"
# With explicit client
from artasupport import ArtaSupportMessage
with ArtaSupportMessage() as client:
response = client.tse_ingest("doc.xlsx")
print(f"Ingestion {response.status}")
Async version:
import asyncio
from artasupport import AsyncArtaSupportMessage
async def upload_file():
async with AsyncArtaSupportMessage() as client:
response = await client.tse_ingest("doc.pdf")
print(f"Status: {response.status}")
asyncio.run(upload_file())
Supported file types: .pdf, .xlsx, .xls, '.txt'. Files can contain embedded images.
Folders are not supported; tse_ingest(...) expects a single file path.
Input styles
For tse_copilot(...) and tse_batch(...), provide exactly one of:
user_input="..."messages=[{"role": "user", "content": "..."}]
Error handling
from artasupport import (
ArtaSupportMessage,
APIError,
AuthenticationError,
RateLimitError,
)
try:
with ArtaSupportMessage() as client:
response = client.tse_copilot(user_input="help", session_id="sess_...")
except AuthenticationError as exc:
print("Invalid/revoked API key:", exc)
except RateLimitError as exc:
print("Rate limited:", exc)
except APIError as exc:
print("API failure:", exc.status_code, exc.request_id, exc.message)
API surface
- Top-level helpers:
tse_copilot(...)tse_batch(...)tse_ingest(file_path)
- Sync client:
ArtaSupportMessagelist_models(),create_session(),delete_session()tse_copilot(...),tse_batch(...),tse_ingest(file_path)
- Async client:
AsyncArtaSupportMessageawait list_models(),await create_session(),await delete_session()await tse_copilot(...),await tse_batch(...),await tse_ingest(file_path)
Metadata
Release files for artasupport 0.1.1
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 | |
|---|---|---|---|---|
| artasupport-0.1.1.tar.gz | 14.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| artasupport-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.2 kB
Release files / artasupport-0.1.1.tar.gz
| Download URL | artasupport-0.1.1.tar.gz |
|---|---|
| Size | 14.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb57163ea8ae323acfe4a7de8362e680ddee2ac93a1d257f7c2c1bd451a7d86d
|
|
BLAKE2b-256 checksum How to use checksums |
f213ea93f5f583d1e51d660be86cdcc30077e5069dd5bd158d93d0db8bfd56af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / artasupport-0.1.1-py3-none-any.whl
| Download URL | artasupport-0.1.1-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
30cdd38eefbebe3e39cc7eb076ef139d9e16db4b748359361f897315c51a0de0
|
|
BLAKE2b-256 checksum How to use checksums |
a6352b48bf435e8d780f1b242c93a80707e9e950fbacfe0dd288fadf590582f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Security for artasupport 0.1.1
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.