LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Client
  • AsyncClient
  • Run Helpers
  • Run Trees
  • Evaluation
  • Schemas
  • Utilities
  • Wrappers
  • Anonymizer
  • Testing
  • Expect API
  • Middleware
  • Pytest Plugin
  • Deployment SDK
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewClientAsyncClientRun HelpersRun TreesEvaluationSchemasUtilitiesWrappersAnonymizerTestingExpect APIMiddlewarePytest PluginDeployment SDK
Language
Theme
Pythonlangsmithsandbox_async_sandboxAsyncSandboxto_sync
Method●Since v0.8

to_sync

Copy
to_sync(
  self,
  *,
  client: Optional[SandboxClient] = None
) -> Sandbox
View source on GitHub

Parameters

NameTypeDescription
clientOptional[SandboxClient]
Default:None

SandboxClient to use for operations. If not provided, one is created with the same configuration as this sandbox's client (see :meth:AsyncSandboxClient.to_sync).

Create a Sandbox for the same underlying sandbox.

The returned instance has auto_delete disabled so the sandbox's lifecycle stays tied to this instance; both refer to the same server-side sandbox.