# Workspaces

> Create a development machine with SSH, VS Code, JupyterLab and a persistent home from Python.

Source: https://nodus-platform-site.pages.dev/docs/guides/python/workspaces/
Build revision: 211ad9f836655b1c3a2668c4693e442471f28614

A Workspace is a development machine with a persistent home directory. It stops when idle, and its home is saved when it stops.

```python
lab = nodus.Workspace.create("lab", gpu="H100:2", image="nodus/workspace-pytorch-cuda", idle_timeout="2h")
lab.wait_ready()
url = lab.open("vscode")          # or "jupyter"; opens the browser and returns the URL
lab.ssh()                         # an SSH session through the nodus CLI
lab.schedule(ready_by="2026-10-01T08:45:00-07:00", stop_at="2026-10-01T19:00:00-07:00")
lab.stop()
for s in lab.sessions():          # one entry per running period, with what it cost
    print(s.billed_seconds, s.charge_usd, s.stop_reason)
```

* The home Volume is `volume=` or `<name>-home`, created if it does not exist. `ephemeral=True` skips it: files are lost on stop.
* `lab.start()` wakes it after an idle or schedule stop; an SSH connection also wakes it.
* `lab.exec(...)` and `lab.files` work as on Sandboxes.
