# Novita Agent Sandbox SDK for Python
A Python SDK for Novita Agent Sandbox environments that provides code execution, desktop automation, and cloud computing capabilities. Compatible with e2b.
[📖 Documentation](https://novita.ai/docs/guides/sandbox-overview) • [🔑 Get API Key](https://novita.ai/settings/key-management)
## 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
```bash
pip install novita-sandbox
```
## Quick Start
### Authentication
Get your Novita API key from the [key management page](https://novita.ai/settings/key-management).
### Core Sandbox
The basic package provides a way to interact with the sandbox environment.
```python
from novita_sandbox.core import Sandbox
import os
# Using the official template `base` by default
sandbox = Sandbox.create(
template="base",
api_key=os.getenv("NOVITA_API_KEY", "")
)
# 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 provides a Jupyter-like environment for executing code using the official `code-interpreter-v1` template.
```python
from novita_sandbox.code_interpreter import Sandbox
import os
sandbox = Sandbox.create(
api_key=os.getenv("NOVITA_API_KEY", "")
)
# Execute Python code
result = sandbox.run_code('print("Hello, World!")')
print(result.logs)
sandbox.kill()
```
### Desktop Automation
The Desktop sandbox allows you to control desktop environments programmatically using the official `desktop` template.
```python
from novita_sandbox.desktop import Sandbox
import os
desktop = Sandbox.create(
api_key=os.getenv("NOVITA_API_KEY", "")
)
# 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](https://novita.ai/docs/guides/sandbox-overview).
## Development
### Install
```bash
poetry install --with dev --extras "all"
```
### Test
```bash
make test
make test-core
make test-code-interpreter
make test-desktop
```
Raw data
{
"_id": null,
"home_page": "https://novita.ai",
"name": "novita-sandbox",
"maintainer": "Novita",
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "support@novita.ai",
"keywords": "Novita, sandbox, ai, agent, sdk, code-interpreter, desktop-automation",
"author": "Novita",
"author_email": "support@novita.ai",
"download_url": "https://files.pythonhosted.org/packages/42/b1/1f9a642cd16775860f76b7487a38d4c24d710adda023952f5cd8893b660b/novita_sandbox-1.0.3.tar.gz",
"platform": null,
"description": "# Novita Agent Sandbox SDK for Python\n\nA Python SDK for Novita Agent Sandbox environments that provides code execution, desktop automation, and cloud computing capabilities. Compatible with e2b.\n\n[\ud83d\udcd6 Documentation](https://novita.ai/docs/guides/sandbox-overview) \u2022 [\ud83d\udd11 Get API Key](https://novita.ai/settings/key-management) \n\n## Features\n\n- **Code Interpreter**: Execute Python, JavaScript, and other languages in isolated environments\n- **Desktop Automation**: Control desktop applications and GUI interactions\n- **Cloud Computing**: Scalable sandbox environments for various computing tasks\n- **Data Visualization**: Built-in charting and visualization capabilities\n- **File System Operations**: Complete file system management and monitoring\n\n\n## Installation\n\n```bash\npip install novita-sandbox\n```\n\n## Quick Start\n\n### Authentication\n\nGet your Novita API key from the [key management page](https://novita.ai/settings/key-management).\n\n### Core Sandbox\n\nThe basic package provides a way to interact with the sandbox environment.\n\n```python\nfrom novita_sandbox.core import Sandbox\nimport os\n\n# Using the official template `base` by default\nsandbox = Sandbox.create(\n template=\"base\",\n api_key=os.getenv(\"NOVITA_API_KEY\", \"\")\n)\n\n# File operations\nsandbox.files.write('/tmp/test.txt', 'Hello, World!')\ncontent = sandbox.files.read('/tmp/test.txt')\n\n# Command execution\nresult = sandbox.commands.run('ls -la /tmp')\nprint(result.stdout)\n\nsandbox.kill()\n```\n\n### Code Interpreter\n\nThe Code Interpreter sandbox provides a Jupyter-like environment for executing code using the official `code-interpreter-v1` template.\n\n```python\nfrom novita_sandbox.code_interpreter import Sandbox\nimport os\n\nsandbox = Sandbox.create(\n api_key=os.getenv(\"NOVITA_API_KEY\", \"\")\n)\n\n# Execute Python code\nresult = sandbox.run_code('print(\"Hello, World!\")')\nprint(result.logs)\n\nsandbox.kill()\n```\n\n### Desktop Automation\n\nThe Desktop sandbox allows you to control desktop environments programmatically using the official `desktop` template.\n\n```python\nfrom novita_sandbox.desktop import Sandbox\nimport os\n\ndesktop = Sandbox.create(\n api_key=os.getenv(\"NOVITA_API_KEY\", \"\")\n)\n\n# Take a screenshot\nscreenshot = desktop.screenshot()\n\n# Automate mouse and keyboard\ndesktop.left_click(100, 200)\ndesktop.press('Return')\ndesktop.write('Hello, World!')\n\ndesktop.kill()\n```\n\n## Documentation\n\nFor comprehensive guides, API references, and examples, visit our [official documentation](https://novita.ai/docs/guides/sandbox-overview).\n\n## Development\n\n### Install\n\n```bash\npoetry install --with dev --extras \"all\" \n```\n\n### Test\n\n```bash\nmake test\nmake test-core\nmake test-code-interpreter\nmake test-desktop\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Novita Agent Sandbox SDK - Python library for Novita Agent Sandbox",
"version": "1.0.3",
"project_urls": {
"Bug Tracker": "https://novita.ai",
"Changelog": "https://novita.ai/docs/changelog",
"Documentation": "https://novita.ai/docs/guides/sandbox-overview",
"Homepage": "https://novita.ai"
},
"split_keywords": [
"novita",
" sandbox",
" ai",
" agent",
" sdk",
" code-interpreter",
" desktop-automation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "28dcd4675e55d2afd258c5bcd65b538b95dc32c1256d17ae5806226bf7e16960",
"md5": "6a92064d442a621379ffcc474d5d2c63",
"sha256": "6977c7788e7e27880269eb207244d583d5b6bf22d6c9ff8b697303bbbe953a87"
},
"downloads": -1,
"filename": "novita_sandbox-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6a92064d442a621379ffcc474d5d2c63",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 216649,
"upload_time": "2025-09-05T15:24:53",
"upload_time_iso_8601": "2025-09-05T15:24:53.420703Z",
"url": "https://files.pythonhosted.org/packages/28/dc/d4675e55d2afd258c5bcd65b538b95dc32c1256d17ae5806226bf7e16960/novita_sandbox-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "42b11f9a642cd16775860f76b7487a38d4c24d710adda023952f5cd8893b660b",
"md5": "eb9592666acf8dfbd88ef89e8572a462",
"sha256": "c8ff18e6704657eb9c282ee15d65c00359c1ee78a473899107d6e9a64b15cad3"
},
"downloads": -1,
"filename": "novita_sandbox-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "eb9592666acf8dfbd88ef89e8572a462",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 175370,
"upload_time": "2025-09-05T15:24:54",
"upload_time_iso_8601": "2025-09-05T15:24:54.906474Z",
"url": "https://files.pythonhosted.org/packages/42/b1/1f9a642cd16775860f76b7487a38d4c24d710adda023952f5cd8893b660b/novita_sandbox-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-05 15:24:54",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "novita-sandbox"
}