Metadata-Version: 2.5
Name: condensationai
Version: 0.1.0
Summary: Condensation SDK for sandboxes and the shared Codegraff wallet
Project-URL: Documentation, https://workspaces.condensation.ai/docs/sdk
License-Expression: MIT
License-File: LICENSE
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# condensationai

Python SDK for Condensation sandboxes and the shared Codegraff wallet.
Requires Python 3.10+; no runtime dependencies.

```sh
pip install condensationai
```

Create a sandbox key at https://workspaces.condensation.ai/account after signing
in with Codegraff. Set `CONDENSATION_API_KEY` in your environment.

```python
from condensationai import Condensation

client = Condensation()
print(client.wallet()["purchasedMicroUsd"] / 1_000_000)
sandbox = client.create(language="python", auto_stop_minutes=5)
try:
    print(client.run(sandbox["id"], 'python -c "print(1 + 1)"')["result"])
finally:
    client.delete(sandbox["id"])
```

This first release routes sandbox operations through Codegraff's existing gateway
at its resource rates, not Condensation's fleet pricing. It spends shared
purchased credits. Condensation monthly bonuses do not fund this path. Stopped
sandboxes may incur storage charges; delete resources when finished. Key budgets
are gateway admission checks and may be exceeded by concurrent or running work.

Methods: `wallet`, `list`, `get`, `create`, `run`, `execution`, `cancel_execution`,
`upload_base64`, `download_base64`, `meter`, `stop`, `start`, `delete`. Use
`run(..., background=True)` for an asynchronous command and poll `execution`.
The SDK itself is synchronous. Current gateway file downloads are text-oriented;
arbitrary binary round trips are not guaranteed.

`Condensation(api_key=..., base_url=..., timeout=120)` accepts explicit options.
The default origin is `https://api.condensation.ai`. Keys are server-side secrets;
do not commit them. No request is retried automatically or follows redirects.
For uncertain mutations, inspect resource state before retrying.
`CondensationError.status` contains the HTTP status (zero for transport errors),
and `.details` contains the API error body.
