# nodus.workspace

> `Workspace`: a development machine with SSH, VS Code, JupyterLab and a persistent home (resources.md §3.8).

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

<!-- Generated by scripts/gen-reference.mjs from the SDK docstrings (griffe). Do not edit: run make gen. -->

`Workspace`: a development machine with SSH, VS Code, JupyterLab and a persistent home (resources.md §3.8).

## `Workspace`

```python
class Workspace(obj: Obj) -> None
```

### `Workspace.create`

```python
create(name: str, *, gpu: Any = None, cpu: Any = None, memory: Any = None, disk: Any = None, image: str | None = None, volume: str | _Volume | None = None, ephemeral: bool = False, tools: list[str] | None = None, idle_timeout: Any = None, secrets: list[Any] | None = None, env: dict[str, str] | None = None, max_cost: Any = None, project: str | None = None) -> _Workspace
```

Create a Workspace; unless `ephemeral=True` its home is `volume` (default `<name>-home`), made if missing.

### `Workspace.exec`

```python
exec(*command: str, pty: bool = False) -> _Process
```

### `Workspace.files`

Type: `_Files`

### `Workspace.from_name`

```python
from_name(name: str, project: str | None = None) -> _Workspace
```

### `Workspace.logs`

```python
logs(follow: bool = False) -> AsyncIterator[str]
```

### `Workspace.name`

Type: `str`

### `Workspace.open`

```python
open(tool: str = 'vscode', browser: bool = True) -> str
```

Mint a preview URL for VS Code or JupyterLab in the browser, open it, and return it.

### `Workspace.schedule`

```python
schedule(ready_by: str | datetime, stop_at: str | datetime | None = None) -> None
```

Be ready by `ready_by` (it starts 15 minutes earlier) and stop at `stop_at`.

### `Workspace.sessions`

```python
sessions() -> list[View]
```

Every running period of this Workspace, each an Attempt whose status is the session’s receipt.

### `Workspace.ssh`

```python
ssh() -> None
```

Open an interactive SSH session through the CLI’s `ssh-proxy` (the CLI writes `~/.ssh/config`).

### `Workspace.start`

```python
start() -> None
```

### `Workspace.status`

```python
status() -> View
```

### `Workspace.stop`

```python
stop() -> None
```

### `Workspace.unschedule`

```python
unschedule() -> None
```

### `Workspace.wait_ready`

```python
wait_ready(timeout: float | None = None) -> View
```

Block until the tools answer (phase `Running`); raises when it fails or stops instead.
