Novita Agent Sandbox SDK for Python
A Python SDK for Novita Agent Sandbox environments that provides code execution, desktop automation, and cloud computing capabilities..
📖 Documentation • 🔑 Get API Key
Features
- Code Interpreter: Execute Python, JavaScript, and other languages in isolated environments
- Desktop Automation: Control desktop applications and GUI interactions
- Cloud Computing: Scalable sandbox environments for various computing tasks
- Data Visualization: Built-in charting and visualization capabilities
- File System Operations: Complete file system management and monitoring
Installation
pip install novita-sandbox
Quick Start
Authentication
Get your Novita API key from the key management page.
Core Sandbox
Use the high-level Novita client to share one set of credentials across namespaces.
import os
from novita_sandbox import Novita
novita = Novita(api_key=os.getenv("NOVITA_API_KEY", ""))
# Using the official template `base` by default
sandbox = novita.sandbox.create("base")
# File operations
sandbox.files.write('/tmp/test.txt', 'Hello, World!')
content = sandbox.files.read('/tmp/test.txt')
# Command execution
result = sandbox.commands.run('ls -la /tmp')
print(result.stdout)
sandbox.kill()
Code Interpreter
The Code Interpreter sandbox is available through the same client.
import os
from novita_sandbox import Novita
novita = Novita(api_key=os.getenv("NOVITA_API_KEY", ""))
sandbox = novita.code_interpreter.create()
# Execute Python code
result = sandbox.run_code('print("Hello, World!")')
print(result.logs)
sandbox.kill()
Desktop Automation
The Desktop sandbox is available through the same client.
import os
from novita_sandbox import Novita
novita = Novita(api_key=os.getenv("NOVITA_API_KEY", ""))
desktop = novita.desktop.create()
# Take a screenshot
screenshot = desktop.screenshot()
# Automate mouse and keyboard
desktop.left_click(100, 200)
desktop.press('Return')
desktop.write('Hello, World!')
desktop.kill()
Documentation
For comprehensive guides, API references, and examples, visit our official documentation.
Development
Install
poetry install --with dev --extras "all"
Test
make test
make test-core
make test-code-interpreter
make test-desktop
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file novita_sandbox-2.0.9.tar.gz.
File metadata
- Download URL: novita_sandbox-2.0.9.tar.gz
- Upload date:
- Size: 495.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/2.1.2 CPython/3.12.13 Linux/6.17.0-1020-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f98db4788faae2e64a872fd75d26a6f13070d267b45c362b21eb6fc0a92e86f
|
|
| MD5 |
6cc639e73a4812b69a279fc212f74219
|
|
| BLAKE2b-256 |
2afecbaf6b61859023f3f14c7d9ca92058282e89887fafab7ee15a43c80b939d
|
File details
Details for the file novita_sandbox-2.0.9-py3-none-any.whl.
File metadata
- Download URL: novita_sandbox-2.0.9-py3-none-any.whl
- Upload date:
- Size: 623.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/2.1.2 CPython/3.12.13 Linux/6.17.0-1020-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63d2f42410fb72d5d8af7bd4007162dd0f090392ca996245480dafc61e2e9c6f
|
|
| MD5 |
f999bdc06d1602cdba8cc31a2e76021e
|
|
| BLAKE2b-256 |
43cea8d636c981c57da95cff83174234d6530ab922bbdfc0b6812e72585ba419
|