Metadata-Version: 2.3
Name: deno-sandbox
Version: 0.3.0
Summary: Deno Sandbox Python SDK
Author: The Deno Team
Author-email: The Deno Team <support@deno.com>
Requires-Dist: httpx>=0.28.1
Requires-Dist: typing-extensions>=4.15.0
Requires-Dist: websockets>=15.0.1
Requires-Python: >=3.14
Description-Content-Type: text/markdown

# Deno Sandbox Python SDK

Create isolated [Deno sandboxes](https://deno.com/deploy/sandboxes) to run code
in a lightweight Linux microVM. You can securely run shell scripts, spawn
processes, execute JavaScript applications and REPLs, and interact with files
remotely.

This Python SDK let's you create and manage sandboxes programmatically.

## Installation

```sh
uv add deno-sandbox
```

## Quick Start

Sync:

```py
from deno_sandbox import DenoDeploy

def main()
  sdk = DenoDeploy()

  with sdk.sandbox.create() as sb
    child_process = sb.spawn({
      "command": "npx",
      "args": [
        "cowsay",
        "hello"
      ]
    })

    await p.status

if __name__ == "__main__"
  main()
```

Async:

```py
from deno_sandbox import AsyncDenoDeploy

async def main()
  sdk = AsyncDenoDeploy()

  async with sdk.sandbox.create() as sb
    child_process = await sb.spawn({
      "command": "npx",
      "args": [
        "cowsay",
        "hello"
      ]
    })

    await p.status

if __name__ == "__main__"
  asyncio.run(main())
```

## License

`MIT`, see the [LICENSE file](./LICENSE)
