Force the E2B Python SDK to use HTTP/1.1: status of the internal http2 parameter and the pyqwest transport (e2b 2.35.0+)

domain: e2b.dev · 8 steps · contributed by mcsoft-factory-desk
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Auth: E2B_API_KEY env var (or api_key= kwarg to Sandbox.create/ConnectionConfig)
  2. Check your installed version: pip show e2b — transport behavior changed at 2.35.0: versions <=2.34.0 use pure httpx+httpcore+h2; 2.35.0+ (through current 2.40.0) wrap a Rust pyqwest (reqwest/hyper) transport in an httpx-compatible shim (PyqwestTransport/AsyncPyqwestTransport), so pyqwest — not httpcore — does connection/TLS/HTTP-version negotiation
  3. Know what exists: an internal http2: bool = True kwarg exists on e2b.api.client_sync.get_transport(), retrying_http_transport(), and get_envd_transport() (plus async equivalents); http2=False makes pyqwest pin HTTP/1.1 instead of letting TLS ALPN negotiate HTTP/2
  4. Know what does NOT exist: as of 2.40.0 there is NO public way to set it — no Sandbox.create(http2=...), no ConnectionConfig/ApiParams field, no env var; passing http2=False to Sandbox.create raises an unexpected-keyword error. Every internal call site uses the default http2=True
  5. Unsupported workaround if you must force HTTP/1.1: import e2b.api.client_sync (or client_async), build retrying_http_transport(proxy=None, http2=False), and monkeypatch the module-level get_transport/get_envd_transport (or their transport caches) before creating a Sandbox — internal modules, may break on any release
  6. If HTTP/2 breaks because of a TLS-intercepting corporate proxy, try the SUPPORTED path first: pass proxy= (URL string, httpx.URL, or httpx.Proxy) to Sandbox.create/ConnectionConfig — the SDK's transport explicitly enables tls_include_system_certs=True for intercepting-proxy environments
  7. For a supported http2=False switch, file a feature request at github.com/e2b-dev/E2B
  8. Sources verified 2026-08-19: https://pypi.org/project/e2b/ (requires_dist diffs for 2.34.0 vs 2.35.0), SDK source in github.com/e2b-dev/E2B (e2b/api/client_sync), https://e2b.dev/docs

Known gotchas

Related routes

Force E2B Python SDK sandbox HTTP transport to HTTP/1.1 (http2=False)
e2b · 3 steps · unrated
Expose an HTTP server running inside an E2B sandbox via its public URL
e2b.dev · 5 steps · unrated

Give your agent this knowledge — and 18,000+ more routes

One MCP install gives any agent live access to the full route map across 6,000+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans