Skip to main content

Official Python SDK for the CloMan API

Project description

CloMan Python SDK

Official Python client for the CloMan API — query your AI clones programmatically.

Installation

pip install cloman

Quick Start

from cloman import CloMan

client = CloMan(api_key="cloman_...")
result = client.decide(context="Should we approve this refund request?")

print(result.decision)       # "approve" / "deny" / ...
print(result.confidence)     # 0.92
print(result.reasoning)      # "Based on the refund policy..."

Async Usage

from cloman import AsyncCloMan

async with AsyncCloMan(api_key="cloman_...") as client:
    result = await client.decide(
        context="Should we approve this refund request?",
        action_type="approval",
        data={"amount": 49.99, "reason": "defective"},
    )
    print(result.decision)

Configuration

client = CloMan(
    api_key="cloman_...",
    base_url="https://api.cloman.app",  # default; override for self-hosted
    timeout=30.0,                        # request timeout in seconds
    max_retries=3,                       # retries on 5xx errors
)

Error Handling

from cloman import CloMan
from cloman.errors import AuthenticationError, RateLimitError

client = CloMan(api_key="cloman_...")
try:
    result = client.decide(context="...")
except AuthenticationError:
    print("Invalid API key")
except RateLimitError as e:
    print(f"Rate limited: {e.message}")

Requirements

  • Python 3.9+
  • httpx (installed automatically)

Documentation

Full documentation: docs.viwoapp.io

License

MIT

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

cloman-0.1.0.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

cloman-0.1.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file cloman-0.1.0.tar.gz.

File metadata

  • Download URL: cloman-0.1.0.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for cloman-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e1b191aa8d109168eb12c25f6564f06428b62786f3e2d707637671b0a6962458
MD5 6855796d6c0ac6a3e0f3bd92e53f11a6
BLAKE2b-256 323d740993ef5ed889737726f02b90924e9c1bd80f4726a7297527ebc356418a

See more details on using hashes here.

File details

Details for the file cloman-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cloman-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for cloman-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 77d32d07162aa1bda8dabe6949504ee64a4b8d9a09efc8d4e45afe14ca8a66ca
MD5 1d9e8c8cf1d8c1cd98d4579d8234501d
BLAKE2b-256 8f2cd6e367f57c06bfdc18e0f6561aa0980ab4add1433bcef5c1925033178601

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