Metadata-Version: 2.4
Name: cloman
Version: 0.1.0
Summary: Official Python SDK for the CloMan API
Project-URL: Homepage, https://viwoapp.io
Project-URL: Documentation, https://docs.viwoapp.io
Project-URL: Repository, https://github.com/cloman-app/cloman-python
Author-email: CloMan <support@cloman.app>
License-Expression: MIT
License-File: LICENSE
Keywords: ai,cloman,clone,decision-making,sdk
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: httpx<1.0.0,>=0.25.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: respx>=0.21; extra == 'dev'
Description-Content-Type: text/markdown

# CloMan Python SDK

Official Python client for the [CloMan](https://cloman.app) API — query your AI clones programmatically.

## Installation

```bash
pip install cloman
```

## Quick Start

```python
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

```python
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

```python
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

```python
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](https://docs.viwoapp.io)

## License

MIT
