tutorials / sandboxing
Tutorial Guide • 10 min read

Full-Stack Web & Python Sandboxing

Safely execute, test, and render reactive apps or terminal scripts.

Overview & Objectives

The browser playground runs supported Python packages through Pyodide, while generated web previews run in sandboxed frames. These boundaries reduce access but do not guarantee arbitrary code is safe.

Core Tutorial Steps

1
Run a Python example

Open the Python Playground and use the packages supported by its browser runtime. Large downloads or unsupported native dependencies may not work in WebAssembly.

2
Preview generated web code

Use Web Sandbox to inspect HTML, JavaScript, and CSS in an isolated preview frame. Review network requests and permissions before using code outside the preview.

3
Understand browser runtime limits

The Python runtime uses WebAssembly and may download packages or runtime files. Available libraries and performance differ from a desktop Python installation.

4
Keep secrets out of previews

Do not put API keys, passwords, or private data into code or files you plan to run in a preview. A sandbox is a defense-in-depth measure, not a substitute for safe inputs.

Pro Tip & Best Practices

Use small sample inputs first, and save a copy of important files before making changes in any interactive tool.