| Name | Modified | Size | Downloads / 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_connectclient to the official Connect RPC client for Python (connectrpc), whose HTTP transport ispyqwest(Rust reqwest/hyper), and switch the envd protobuf messages from Google'sprotobufruntime to Buf'sprotobuf-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
protobufpackage, removing a common source of dependency conflicts with other libraries that pin it. - The
e2b_connectmodule is no longer shipped with the package. Code that imported it directly should useconnectrpc(ConnectError,Code) instead; SDK exception types (SandboxException,TimeoutException, ...) are unchanged. - The generated
e2b.envd.*.*_pb2modules were replaced byprotobuf-pyequivalents (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
proxyoption applies to sandbox RPC calls the same way it does to the REST API and file transfer requests. URL strings,httpx.URL, andhttpx.Proxyvalues keep working (credentials in the URL or inhttpx.Proxy(auth=...));httpx.Proxycustom headers andssl_contextare not supported for RPC calls and raiseInvalidArgumentException. CommandResult.error(andCommandHandle.error) is nowNonewhen a command finishes without an error, matching the declaredOptional[str]type and the JS SDK'serror?: string. It used to be""on success — code comparingresult.error == ""or treating it as always-strshould check forNone/falsiness instead.- For async streaming calls (
commands.run/connect, PTY,files.watch_dir),request_timeoutnow bounds opening the stream — the wait until envd confirms with a start event, matching the JS SDK'srequestTimeoutMs— and raisesTimeoutExceptionwhen exceeded. The running stream is bounded by the command/watchtimeout(as before). In the sync SDK there is no way to interrupt the blocking wait, sorequest_timeoutis not applied to opening the stream — both stream setup and the running stream are bounded bytimeout(unlimited when0). -
E2B_MAX_CONNECTIONSno 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.SYMLINKto the sandbox filesystem types. Newer envd versions report symlinks with a dedicatedFILE_TYPE_SYMLINKentry type; previously the SDKs treated it as unknown, sofiles.list()silently omitted symlink entries andgetInfo()/get_info()returned anundefined/Nonetype for them. Symlinks now surface asFileType.SYMLINK('symlink') withsymlinkTarget/symlink_targetpopulated, 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,runInStackTraceOverrideContextand 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/SandboxRefreshRequestrequest schemas,SandboxNetworkConfigandSandboxIamworkload-identity models, theFILE_TYPE_SYMLINKfilesystem entry type, and deprecation of access-token auth in favor of API keys. Anything the upstream specs markx-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