Skip to main content

A CLI tool to run Python projects in sandboxed environments.

Project description

Sandbox Engine

A fast, lightweight, and secure CLI tool for running Python projects in isolated environments.

Built with Go


Overview

sandbox-engine allows developers to instantly spin up Python applications (like FastAPI, Django, Flask, Streamlit) without corrupting their global environment or modifying their local project files.

It automatically detects your framework, analyzes your code to dynamically generate required dependencies, strictly isolates the execution environment, and cleans up the sandbox the moment you exit.

Installation

Install globally using pip:

pip install sandbox-engine-cli

(Note: The PyPI package is named sandbox-engine-cli, but the designated terminal command is sandbox-engine).

Core Commands

Navigate to any existing Python project directory and run:

scan

Instantly analyzes the project structure.

  • Discovers all Python files.
  • Locates potential application entrypoints (e.g., app.py, main.py).
  • Identifies existing virtual environments and dependency management files.
sandbox-engine scan

detect

Intelligently infers your application architecture.

  • Auto-detects the web framework (Flask, FastAPI, Django, Streamlit, Gradio).
  • Identifies the exact port the application intends to use.
  • Deep AST Analysis: Scans your code to find all third-party imports, filtering out over 150 standard library modules to determine exactly what your application requires to run.
sandbox-engine detect

run

Standard execution with dependency injection.

  • Scans your imports and cross-verifies them against your existing requirements.txt.
  • Automatically appends missing dependencies.
  • Sets up a standard virtual environment (venv) and executes the application.
sandbox-engine run

run --isolated (Recommended)

Zero-mutation execution. The safest method to test an untrusted or disorganized project.

  • Creates a temporary, hidden .sandbox environment.
  • Dynamically generates a requirements.txt internal to the sandbox.
  • Safely installs dependencies strictly within the isolated environment.
  • Executes the application securely.
  • Graceful Teardown: Terminating with Ctrl+C immediately kills the spawned processes and destroys the sandbox directory, returning your project cleanly to its original state.
sandbox-engine run --isolated

Contributing

Contributions, issues, and feature requests are welcome. Please refer to the issues page.


Created by Vivan Rajath

Contact: vivanrajath999@gmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sandbox_engine_cli-1.0.5.tar.gz (2.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sandbox_engine_cli-1.0.5-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

File details

Details for the file sandbox_engine_cli-1.0.5.tar.gz.

File metadata

  • Download URL: sandbox_engine_cli-1.0.5.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for sandbox_engine_cli-1.0.5.tar.gz
Algorithm Hash digest
SHA256 281679ba33e5077ca3c6bc19d7d38eb51f2d3623dabc4acff62b342ceb26e48d
MD5 3064e2911c7f4fc587ea499a65ac21bc
BLAKE2b-256 3a4cffa797b9b4121c5ec76f33fc8ae619c055060059c20be3750f311b5697f6

See more details on using hashes here.

File details

Details for the file sandbox_engine_cli-1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for sandbox_engine_cli-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 409dd0ffa7c62c79e6709e57ded50ffa624cb9f6a95c47e2e4e7d1acb42ec7c9
MD5 ebdc6d0e190d540be5a5186f358ba06d
BLAKE2b-256 3b0fed7edd58cab58ef92c9227a2fa727bc8d6f9ccee830369b28e613468c632

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page