Metadata-Version: 2.2
Name: py-arrakis
Version: 1.1.2
Summary: Python SDK for the Arrakis sandboxes - https://github.com/abshkbh/arrakis
Home-page: https://github.com/abshkbh/py-arrakis
Author: Abhishek Bhardwaj
Author-email: abshkbh@gmail.com
Keywords: virtualization,sandbox,vm,testing
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# py-arrakis

Python SDK for [Arrakis](https://github.com/abshkbh/arrakis).

## Description

This package provides a Python SDK over the REST API exposed by [Arrakis](https://github.com/abshkbh/arrakis).

## Installation

```
pip install py-arrakis
```

## Usage

The SDK provides a simple interface to manage Arrakis sandbox VMs:

```python
from py_arrakis import SandboxManager

# Initialize the sandbox manager with the Arrakis server URL
manager = SandboxManager("http://localhost:7000")

# List all VMs
sandboxes = manager.list_all()

# Start a new VM
sandbox = manager.start_sandbox("my-sandbox")

# Run a command in the VM
result = sandbox.run_cmd("echo hello world")
print(result["output"])

# Create a snapshot
snapshot_id = sandbox.snapshot("snapshot-v1")

# Destroy the VM when done
sandbox.destroy()

# Restore from snapshot
restored_sandbox = manager.restore("my-vm", snapshot_id)
```

For more examples, check out the [cookbook.py](examples/cookbook.py) file.

## License

MIT
