condensationai
Python SDK for Condensation sandboxes and the shared Codegraff wallet. Requires Python 3.10+; no runtime dependencies.
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.
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.
Own-fleet preview (0.2.0)
Use client.fleet for Condensation's own Cube infrastructure. The original
client.create API still uses the existing gateway provider and its pricing.
Own-fleet machines have 2 vCPU and 2000 MiB memory. Rates are $0.03/vCPU-hour plus $0.01/GiB-hour, with ephemeral storage included. Leases are 60–1800 seconds. Creation requires a UUID request ID, reserves purchased account credits, and is never automatically retried. Preserve the same request ID after an uncertain response. Confirm a terminal state after deletion to verify cleanup and settlement.
The fleet supports pricing, list, get, create, command execution, base64 file upload/download (1 MB), and permanent deletion. Python and shell are available. See https://workspaces.condensation.ai/docs/fleet for examples and MCP setup.
The Python distribution includes the condensation-mcp stdio command. Configure
CONDENSATION_API_KEY with an account-scoped key from the account page.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file condensationai-0.2.0.tar.gz.
File metadata
- Download URL: condensationai-0.2.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af41efe4e7c0985f6cf415d83c65694a07ea91554fb3605835a1de29d9232911
|
|
| MD5 |
f1069f97f72309ded33570cf77e25ffc
|
|
| BLAKE2b-256 |
51063a8b74bb415d4cdc6eb77fb04111eeb16e4173daaaa6b21046fa662aff6c
|
File details
Details for the file condensationai-0.2.0-py3-none-any.whl.
File metadata
- Download URL: condensationai-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fabb54750a1c4e7990136380af66108c7be728c826042f67936e8bf1b8d3978a
|
|
| MD5 |
e5ba89a498cabfb746a85747d61a7e4b
|
|
| BLAKE2b-256 |
e683a16a2c90bfc4bc572bdeaf4c91da5d1be463de76aad3303e2355fee40d17
|