Skip to main content

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.

Metadata

Release files for condensationai 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for condensationai 0.2.0
File Size Uploaded Provenance
condensationai-0.2.0.tar.gz 7.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for condensationai 0.2.0
File Interpreter ABI Platform
condensationai-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.8 kB

Release files / condensationai-0.2.0.tar.gz

Download URL condensationai-0.2.0.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
af41efe4e7c0985f6cf415d83c65694a07ea91554fb3605835a1de29d9232911
BLAKE2b-256 checksum
How to use checksums
51063a8b74bb415d4cdc6eb77fb04111eeb16e4173daaaa6b21046fa662aff6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.2

Release files / condensationai-0.2.0-py3-none-any.whl

Download URL condensationai-0.2.0-py3-none-any.whl
Size 9.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fabb54750a1c4e7990136380af66108c7be728c826042f67936e8bf1b8d3978a
BLAKE2b-256 checksum
How to use checksums
e683a16a2c90bfc4bc572bdeaf4c91da5d1be463de76aad3303e2355fee40d17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.2

Security for condensationai 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page