Download Latest Version e2b@2.36.0 source code.zip (2.2 MB)
Email in envelope

Get an email when there's a new version of E2B

Home / @e2b_python-sdk@2.35.0
Name Modified Size InfoDownloads / Week
Parent folder
@e2b_python-sdk@2.35.0 source code.tar.gz 2026-07-24 1.7 MB
@e2b_python-sdk@2.35.0 source code.zip 2026-07-24 2.2 MB
README.md 2026-07-24 5.3 kB
Totals: 3 Items   3.9 MB 0

Minor Changes

  • 00253c3: Migrate the sandbox RPC layer (commands, PTY, filesystem watch) from the vendored e2b_connect client to the official Connect RPC client for Python (connectrpc), whose HTTP transport is pyqwest (Rust reqwest/hyper), and switch the envd protobuf messages from Google's protobuf runtime to Buf's protobuf-py.

Closing a command or watch stream early now sends RST_STREAM to the server, so abandoned streams no longer leak on the shared HTTP/2 connection, and peer resets surface as typed errors instead of ambiguous EOFs. The REST API and file upload/download keep using httpx.

Notes:

  • The SDK no longer depends on the protobuf package, removing a common source of dependency conflicts with other libraries that pin it.
  • The e2b_connect module is no longer shipped with the package. Code that imported it directly should use connectrpc (ConnectError, Code) instead; SDK exception types (SandboxException, TimeoutException, ...) are unchanged.
  • The generated e2b.envd.*.*_pb2 modules were replaced by protobuf-py equivalents (e2b.envd.process.process_pb, e2b.envd.filesystem.filesystem_pb) with a different message API.
  • Connection retries for sandbox RPC calls (E2B_CONNECTION_RETRIES, default 3) now retry only failures establishing the connection — before the request could have reached envd — with exponential backoff. Unary RPCs are no longer replayed when the connection drops mid-request, which could re-execute a delivered call (e.g. re-send process input); such drops surface as errors immediately, the way they always did for streaming calls.
  • The proxy option applies to sandbox RPC calls the same way it does to the REST API and file transfer requests. URL strings, httpx.URL, and httpx.Proxy values keep working (credentials in the URL or in httpx.Proxy(auth=...)); httpx.Proxy custom headers and ssl_context are not supported for RPC calls and raise InvalidArgumentException.
  • CommandResult.error (and CommandHandle.error) is now None when a command finishes without an error, matching the declared Optional[str] type and the JS SDK's error?: string. It used to be "" on success — code comparing result.error == "" or treating it as always-str should check for None/falsiness instead.
  • For async streaming calls (commands.run/connect, PTY, files.watch_dir), request_timeout now bounds opening the stream — the wait until envd confirms with a start event, matching the JS SDK's requestTimeoutMs — and raises TimeoutException when exceeded. The running stream is bounded by the command/watch timeout (as before). In the sync SDK there is no way to interrupt the blocking wait, so request_timeout is not applied to opening the stream — both stream setup and the running stream are bounded by timeout (unlimited when 0).
  • E2B_MAX_CONNECTIONS no longer applies to sandbox RPC traffic: the new transport bounds only idle connections per host (E2B_KEEPALIVE_EXPIRY, E2B_MAX_KEEPALIVE_CONNECTIONS), not the total number of open connections. It still applies to the REST API and file transfers.

  • 4fcf7cb: Add FileType.SYMLINK to the sandbox filesystem types. Newer envd versions report symlinks with a dedicated FILE_TYPE_SYMLINK entry type; previously the SDKs treated it as unknown, so files.list() silently omitted symlink entries and getInfo()/get_info() returned an undefined/None type for them. Symlinks now surface as FileType.SYMLINK ('symlink') with symlinkTarget/symlink_target populated, in JS and both sync and async Python.

Patch Changes

  • 3f46d56: Select template build-step stack-trace frames by SDK boundary instead of fixed depth. The caller's frame is now the first one whose file lies outside the SDK package, so traces stay correct when transpilers inject extra frames (e.g. TS class-field initializers) or runtimes elide delegating frames (e.g. Bun's tail-call elision). The suppress/override stack-trace collection machinery this made redundant (runInNewStackTraceContext, runInStackTraceOverrideContext and their Python equivalents) is removed.
  • 4fcf7cb: Regenerate API clients from the latest specs, which are now synced with Copybara from their source-of-truth repositories (e2b-dev/infra@e2255f0 for the REST and envd specs, belt for the volume-content spec) instead of being copied by hand. Picks up the latest spec changes: named SandboxTimeoutRequest/SandboxSnapshotRequest/SandboxRefreshRequest request schemas, SandboxNetworkConfig and SandboxIam workload-identity models, the FILE_TYPE_SYMLINK filesystem entry type, and deprecation of access-token auth in favor of API keys. Anything the upstream specs mark x-not-implemented: true (currently the SOCKS5 egress-proxy config) is excluded from the generated clients. Generated Python client models now list fields in spec order instead of alphabetical order (the tag filtering moved from a custom script to Redocly CLI); construct them with keyword arguments if you don't already
Source: README.md, updated 2026-07-24