Metadata-Version: 2.4
Name: fastvm
Version: 0.1.1
Summary: Async Python SDK for the FastVM microVM platform
Project-URL: Homepage, https://fastvm.org
Project-URL: Documentation, https://fastvm.org/docs
Project-URL: Source, https://github.com/fastvm/fastvm-sdk
Author-email: FastVM <hello@fastvm.org>
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: AsyncIO
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: httpx[http2]>=0.27
Description-Content-Type: text/markdown

# FastVM Python SDK

Async Python SDK for the [FastVM](https://fastvm.org) microVM platform. Launch, snapshot, restore, and run commands on microVMs over HTTP/2 with multiplexed connections.

## Installation

```bash
pip install fastvm
```

or with [uv](https://docs.astral.sh/uv/):

```bash
uv add fastvm
```

## Quick Start

```bash
export FASTVM_API_KEY="your-key"
```

```python
from fastvm import FastVM

async with FastVM() as client:
    vm = await client.launch(machine="c1m2")
    snapshot = await client.snapshot(vm, name="my-snap")
    restored = await client.restore(snapshot)
    result = await client.run(restored, "echo hello")

    print(result.stdout)  # hello
```

## API Overview

| Method                                   | Description                     |
| ---------------------------------------- | ------------------------------- |
| `launch()`                               | Launch a new microVM            |
| `restore()`                              | Restore a VM from a snapshot    |
| `run()`                                  | Execute a command on a VM       |
| `snapshot()`                             | Create a point-in-time snapshot |
| `get()` / `list()`                       | Fetch VM state                  |
| `remove()`                               | Delete a VM                     |
| `list_snapshots()` / `remove_snapshot()` | Manage snapshots                |
| `set_firewall()` / `patch_firewall()`    | Configure IPv6 ingress firewall |
| `quotas()`                               | Fetch organization quota usage  |

## Documentation

See the [FastVM documentation](https://fastvm.org/docs) for the full API reference and guides.

## Examples

```bash
uv run examples/create-vm.py      # launch a VM and run commands
uv run examples/large_fanout.py   # snapshot + restore 10 VMs concurrently
```

## License

Apache-2.0
