Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions docs/getting-started/quickstart-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ print(response.text)
"""

async with boxlite.CodeBox() as codebox:
# Install packages explicitly before use
await codebox.install_package("requests")
result = await codebox.run(code)
print(result)

Expand All @@ -83,10 +85,11 @@ python codebox.py
```

**What's happening:**
1. CodeBox automatically installs required packages (requests)
2. Executes the code in complete isolation
3. Returns the output
4. Your host system remains completely safe
1. CodeBox executes the code in complete isolation
2. Returns the output
3. Your host system remains completely safe

**Note:** Each `run()` call executes in a fresh Python process. Variables, imports, and state do not persist between calls. To share state, combine code into a single `run()` call.

## Running Examples

Expand Down
3 changes: 2 additions & 1 deletion sdks/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ print(response.text)
"""

async with boxlite.CodeBox() as codebox:
# CodeBox automatically installs packages
# Install packages explicitly before use
await codebox.install_package("requests")
result = await codebox.run(code)
print(result)

Expand Down
Loading