Skip to main content

UIP-AI Python SDK — integrate with the UIP-AI Platform: workflows, jobs, templates, credentials

Project description

UIP-AI Python SDK

Python client for the UIP-AI Platform — workflows, jobs, templates, credentials.

Install

pip install uip-sdk

Or install from source:

cd packages/uip-sdk-python
pip install -e .

Quick Start

from uip.sdk import UIPClient

client = UIPClient(
    base_url="http://localhost:8000",
    token="<your-api-token>",
)

# Health check
print(client.monitoring.health())

# List workflows
for wf in client.workflows.list():
    print(f"  {wf.id}: {wf.name}")

# Deploy a template
workflow = client.templates.deploy(
    "telegram-ai-assistant",
    parameters={"bot_token": "..."},
)

# Submit and wait for completion
job = client.jobs.submit(workflow.id)
result = job.wait(timeout=60)
print(f"Job {job.id}: {job.status}")

Resources

Resource Description
client.workflows CRUD for workflow definitions
client.jobs Submit, poll, cancel, stream jobs
client.templates List and deploy templates
client.credentials Store and manage secrets
client.connectors Inspect registered connector types
client.ai List AI providers and models
client.monitoring Platform health and status
client.manifest System capabilities and version

Examples

Deploy and run a template

wf = client.templates.deploy("demo-hello-world")
job = client.jobs.submit(wf.id)
result = job.wait(timeout=30)
print(result.result)

Stream job events

for event in client.jobs.stream(job.id):
    print(f"[{event['event']}] {event['data']}")

Credential management

cred = client.credentials.create(
    name="OpenAI Key",
    provider="openai",
    type="api_key",
    value="sk-...",
)

Error Handling

from uip.sdk import UIPClient, NotFoundError, ValidationError

client = UIPClient(base_url="...", token="...")
try:
    wf = client.workflows.get("nonexistent")
except NotFoundError:
    print("Workflow not found")
except ValidationError as e:
    print(f"Invalid data: {e.detail}")

Version Compatibility

See the System Manifest for the supported platform version.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uip_ai_sdk-1.0.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uip_ai_sdk-1.0.0-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file uip_ai_sdk-1.0.0.tar.gz.

File metadata

  • Download URL: uip_ai_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for uip_ai_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ad547f099a7f9b4de1e6b5ee740f6a1e9606bd0af78d5dc18644f10889fe1fc8
MD5 927b70b9523d1343e120776e9245329a
BLAKE2b-256 edaa0cf91d3946c5d99a6354f5a396d34663fefac889e0e7619a6a7c41478a6d

See more details on using hashes here.

File details

Details for the file uip_ai_sdk-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: uip_ai_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for uip_ai_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2331d7051947a774cbd51c0085c68e96b8fa27dd1d3fba2333bc9c5443946a18
MD5 30eab1e803ae762c04bcf5d05259064c
BLAKE2b-256 032e136c1dd9f18a5cc59752629f991b2865336fd44c9e8cb081e9a4cce5878c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page