# gui-new

HTML in, URL out. Python SDK for [gui.new](https://gui.new).

## Install

```bash
pip install gui-new
```

## Quick Start

```python
import gui_new

canvas = gui_new.create("<h1>Hello World</h1>")
print(canvas.url)  # https://gui.new/abc123
```

## Usage

```python
# Create
canvas = gui_new.create(
    html="<h1 style='color:red'>Alert</h1>",
    title="My Dashboard"
)

# Update
gui_new.update(canvas.id, "<h1>Updated</h1>", canvas.edit_token)

# Extend expiry (+24h)
gui_new.extend(canvas.id, canvas.edit_token)

# Delete
gui_new.delete(canvas.id, canvas.edit_token)
```

## Pro API Key

```bash
export GUI_NEW_API_KEY=your_key
```

```python
# Automatically uses the env var
canvas = gui_new.create("<h1>Pro canvas</h1>")
```

## Links

- [gui.new](https://gui.new)
- [API Docs](https://gui.new/docs)
- [npm SDK](https://www.npmjs.com/package/gui-new)
