# 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/f0/21/8639790157c723ad13837c1835e217646e547091b435a7691abaa065cd40/novita_sandbox-1.0.4.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.4",
"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": "00bc7b00b2b66606fae4ad001334a4ffccab182c54f7aa775685ed38bdc55b55",
"md5": "074a65d0a5b26b366d2cc065b458043b",
"sha256": "9dcad6b8d2245aff16d025886ce9cfa699e7d416df7548b140e50b8fe562ccc9"
},
"downloads": -1,
"filename": "novita_sandbox-1.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "074a65d0a5b26b366d2cc065b458043b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 217135,
"upload_time": "2025-09-11T11:42:53",
"upload_time_iso_8601": "2025-09-11T11:42:53.860371Z",
"url": "https://files.pythonhosted.org/packages/00/bc/7b00b2b66606fae4ad001334a4ffccab182c54f7aa775685ed38bdc55b55/novita_sandbox-1.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f0218639790157c723ad13837c1835e217646e547091b435a7691abaa065cd40",
"md5": "09ec1df71764e1bb51d4f32f2544dec0",
"sha256": "9c787d98e56aba42492b9e16950674834971ef399467f44d3eb764164cb80fda"
},
"downloads": -1,
"filename": "novita_sandbox-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "09ec1df71764e1bb51d4f32f2544dec0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 175784,
"upload_time": "2025-09-11T11:42:55",
"upload_time_iso_8601": "2025-09-11T11:42:55.529548Z",
"url": "https://files.pythonhosted.org/packages/f0/21/8639790157c723ad13837c1835e217646e547091b435a7691abaa065cd40/novita_sandbox-1.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-11 11:42:55",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "novita-sandbox"
}