This release is a pre-release and may not be stable for production use.
BoxFab Code Interpreter (Python)
Run AI-generated code in isolated BoxFab sandboxes, Jupyter-style: Python, JavaScript, TypeScript, R, Java and Bash, with results such as text, tables and charts returned as data.
Getting started
1. Install the SDK
pip install boxfab-code-interpreter
2. Get a BoxFab API key
Get a key from the BoxFab dashboard and set it as BOXFAB_API_KEY.
The SDK reads only BOXFAB_* variables.
3. Execute code with code interpreter inside Sandbox
from boxfab_code_interpreter import Sandbox
with Sandbox.create() as sandbox:
sandbox.run_code("x = 1")
execution = sandbox.run_code("x+=1; x")
print(execution.text) # outputs 2
4. Bind the configuration to a client
The top-level Sandbox and AsyncSandbox exports read their configuration from the environment variables. To use an explicit configuration — e.g. several API keys or domains in one process — create a BoxFab client and use the resource classes it exposes:
from boxfab_code_interpreter import BoxFab
client = BoxFab(api_key="e2b_***", domain="boxfab.io")
with client.Sandbox.create() as sandbox:
execution = sandbox.run_code("x = 1; x += 1; x")
# The async variant is exposed as well.
async_sandbox = await client.AsyncSandbox.create()
# The core resources are bound to the client's configuration as well.
volume = client.Volume.create("my-volume")
exists = client.Template.exists("my-template")
secret = client.Secret.create("openai-api-key", "sk-***")
# The classes can be assigned and used like the top-level ones.
Sandbox = client.Sandbox
paginator = Sandbox.list()
Per-call params still take precedence over the client's params, and clients are isolated from each other and from the env-configured top-level exports.
Under the hood
Sandboxes are created from the code-interpreter-v1 template, which BoxFab provides to every team:
a Jupyter server with common data-science packages. BoxFab sandboxes are
Firecracker microVMs, run on the open-source
E2B sandbox infrastructure. This package is derived from the
open-source E2B Code Interpreter SDK;
UPSTREAM.md lists every change.
Using the E2B Code Interpreter SDKs. BoxFab serves the same API and provides the
code-interpreter-v1 template, so the E2B Code Interpreter SDKs work with it as well. Set both
variables, the domain first:
export E2B_DOMAIN=boxfab.io
export E2B_API_KEY="<your BoxFab API key>"
Without E2B_DOMAIN, the E2B SDKs send requests, including the key, to E2B's own service.
Tested against BoxFab with e2b-code-interpreter 2.11.6 (Python) and @e2b/code-interpreter 2.9.0
(JavaScript).
License
MIT, as the E2B Code Interpreter SDK it is derived from; see LICENSE.
BoxFab is a product of ContextFab, Inc.
Metadata
Release files for boxfab-code-interpreter 0.1.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| boxfab_code_interpreter-0.1.0a1.tar.gz | 13.2 kB | With provenance | Details for boxfab_code_interpreter-0.1.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| boxfab_code_interpreter-0.1.0a1-py3-none-any.whl | Python 3 | none | any | Details for boxfab_code_interpreter-0.1.0a1-py3-none-any.whl |
Total release size: 31.6 kB
Release files / boxfab_code_interpreter-0.1.0a1.tar.gz
| Download URL | boxfab_code_interpreter-0.1.0a1.tar.gz |
|---|---|
| Size | 13.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a552d95971501b38a029cce95bd8da818c5de7a372649dcaba44fefcdc842cbc
|
|
BLAKE2b-256 checksum How to use checksums |
cce921fea5ca35ccd3d9c59317dd5acd664ad09a2f6cd536ade09abe64ca7edb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logRelease files / boxfab_code_interpreter-0.1.0a1-py3-none-any.whl
| Download URL | boxfab_code_interpreter-0.1.0a1-py3-none-any.whl |
|---|---|
| Size | 18.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aed666fb6885f6db45c4d05a75a6e502142e7316b4631b8b5ec736d99d8cdc4f
|
|
BLAKE2b-256 checksum How to use checksums |
5ff583f4bec238fff8729d5980421a24fc26eefd5204c639b2d12e936393a8f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logSecurity for boxfab-code-interpreter 0.1.0a1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for boxfab_code_interpreter-0.1.0a1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.