Metadata-Version: 2.5
Name: creat01deployengine
Version: 1.0.0
Summary: Official Python SDK for Creat01 DeployEngine
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: httpx<1,>=0.27
Provides-Extra: test
Requires-Dist: pytest-asyncio>=0.24; extra == 'test'
Requires-Dist: pytest>=8; extra == 'test'
Description-Content-Type: text/markdown

# creat01deployengine Python SDK

Official synchronous and asynchronous clients for the DeployEngine API.

```bash
python -m pip install creat01deployengine
```

Use `DeployEngine` in synchronous code, `AsyncDeployEngine` in asyncio code,
and `Tracker`/`LogReporter` for application-side event ingestion. Never ship a
management API key in browser, desktop, or mobile code.

```python
import os
from creat01deployengine import DeployEngine
from creat01deployengine.errors import PermissionDeniedError

try:
    with DeployEngine(
        api_key=os.environ["DEPLOYENGINE_API_KEY"],
        base_url="https://deployengine.creat01.com",
    ) as client:
        projects = client.projects.list(page=1, pageSize=20)
        machine = client.machines.get(12)
except PermissionDeniedError as exc:
    print(f"missing API scope; request={exc.request_id}")
```

```python
from creat01deployengine import AsyncDeployEngine

async with AsyncDeployEngine(api_key=key) as client:
    projects = await client.projects.list()
```

## Resource map

| Attribute | Purpose | Typical scope |
|---|---|---|
| `projects` | CRUD, precheck, deployments, releases, deploy/restart streams | `read`, `deploy` |
| `machines` | CRUD, recommendations, Agent state, port checks | `machines` |
| `workflows` | Task progress, detail, termination | `read`, `deploy` |
| `certificates` | CRUD, upload, renewal, deployment | `certificates` |
| `domains` | Domain CRUD and DNS records | `read` |
| `load_balancers` | Gateway config, sync, bindings, listeners | `infrastructure` |
| `security_groups` | Host firewall policy, apply, rules | `infrastructure` |
| `alerts` | Alert contacts and notification sending | `monitoring` |
| `payments` | Payment orders and refunds | `business` |
| `authentication` | Project SMS/email/password login | `business` |
| `feedback` | Customer feedback ticket links | `business` |
| `tracking` | Low-level event ingestion | tracking write key |

```python
with DeployEngine(api_key=key) as client:
    for event in client.projects.deploy_stream(7, {"branch": "main"}):
        print(event)
```

Resources return the unwrapped `data` field. Writes are not retried unless an
idempotency key is present. `DeployEngineError` exposes `status_code`, `code`,
`request_id`, `details`, and `retryable`. See `AI_USAGE.md` for task recipes.

Maintainers can run the opt-in live smoke test with
`DEPLOYENGINE_E2E_API_KEY=... pytest tests/test_live_api.py`. It performs only
authenticated list operations and does not deploy or mutate resources.
