SandboxFusionClient - Tinker Documentation

tinker_cookbook.sandbox.SandboxFusionClient

class tinker_cookbook.sandbox.SandboxFusionClient()

Async HTTP client for SandboxFusion code execution.

Usage:

client = SandboxFusionClient()
success, response = await client.run(
    code="print('hello')",
    files={"data.txt": "some content"},
    timeout=30,
)
await client.close()

run( code, files, timeout, language)

Execute code with supporting files in the sandbox.

Parameters:

Returns: Tuple of (success: bool, response: dict) - success is True only if status == "Success" - response contains the full API response or error details

close()

Close the HTTP session and release resources.

Returns: None