Feature
Pre-built Templates
Ready-to-use environments for instant start. Python, Node.js, data science — all pre-configured and cached for fast boot times.
templates.py
1from hopx_ai import Sandbox
2
3# Use a pre-built template
4sandbox = Sandbox.create(template="code-interpreter")
5
6# Templates come with pre-installed packages
7result = sandbox.run_code("""
8import pandas as pd
9import numpy as np
10import matplotlib.pyplot as plt
11
12# All these are already installed!
13print(f"pandas: {pd.__version__}")
14print(f"numpy: {np.__version__}")
15""")
16
17print(result.stdout)
18
19# List available templates
20templates = Sandbox.list_templates()
21for t in templates:
22 print(f"{t.name}: {t.description}")Available Templates
🐍
code-interpreter
Python + Node.js + common libraries
⚡
nodejs
Node.js 20 with npm and common packages
🐧
ubuntu
Clean Ubuntu 22.04 base image
📊
data-science
Python with pandas, numpy, sklearn, matplotlib