class documentation
class TemporalSandboxClient(BaseSandboxClient[
Constructor: TemporalSandboxClient(name, config)
Stateless client that dispatches all lifecycle operations as Temporal activities.
No inner client is needed -- session creation, resumption, and deletion are
all handled by activities whose names are prefixed with the provider
name (e.g. "daytona-sandbox_create_session"). The real
BaseSandboxClient lives inside SandboxClientProvider on the worker.
Users should never need to instantiate this directly -- use
temporalio.contrib.openai_agents.workflow.temporal_sandbox_client
instead.
| Parameters | |
| name | The name of the SandboxClientProvider registered on the
worker. Used as an activity-name prefix so that the correct
sandbox backend is targeted. |
| config | Optional activity configuration for controlling timeouts, retries, etc. Defaults to a 5-minute start_to_close_timeout. |
| Method | __init__ |
Initialize the client. |
| Async Method | create |
Create a new sandbox session via activity. |
| Async Method | delete |
Delete a sandbox session via activity. |
| Method | deserialize |
Deserialize a session state from a dict. |
| Async Method | resume |
Resume an existing sandbox session via activity. |
| Instance Variable | backend |
Undocumented |
| Instance Variable | _config |
Undocumented |
| Instance Variable | _name |
Undocumented |
async def create(self, *, snapshot:
SnapshotSpec | SnapshotBase | None = None, manifest: Manifest | None = None, options: BaseSandboxClientOptions) -> SandboxSession:
(source)
¶
Create a new sandbox session via activity.