# nodus.app

> `App`: the group of Functions defined in one Python file (resources.md §3.9, ADR-047).

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

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

`App`: the group of Functions defined in one Python file (resources.md §3.9, ADR-047).

`with app.run():` creates an ephemeral App (renewed every 30 s, deleted on exit, so a vanished client leaves nothing running); `app.deploy()` creates or updates the persistent App and prunes members removed from the file. Code is uploaded once per content hash. Decorating never touches the network, so the worker can import the same file.

## `App`

```python
class App(name: str, *, project: str | None = None, image: Any = None, secrets: list[Any] | None = None, volumes: dict[str, Any] | None = None, description: str | None = None) -> None
```

### `App.cls`

```python
cls(_cls: type | None = None, **options: Any) -> Any
```

Register a class as one Function; `@nodus.method()`s are callable remotely, hooks run once per worker.

### `App.deploy`

```python
deploy() -> View
```

Create or update the persistent App and its members; members no longer in the file are deleted.

### `App.function`

```python
function(_fn: Callable[..., Any] | None = None, *, name: str | None = None, gpu: Any = None, cpu: Any = None, memory: Any = None, ephemeral_disk: Any = None, image: Any = None, secrets: list[Any] | None = None, volumes: dict[str, Any] | None = None, env: dict[str, str] | None = None, network: Any = None, timeout: Any = None, retries: Any = None, checkpoint: Any = None, interruptible: Any = None, region: Any = None, profile: Any = None, max_cost: Any = None, min_workers: int | None = None, max_workers: int | None = None, scaledown_window: Any = None, target_concurrency: int | None = None, min_containers: int | None = None, max_containers: int | None = None) -> Any
```

Register a Function; the arguments map onto Function spec fields (resources.md §10.4).

### `App.local_entrypoint`

```python
local_entrypoint(_fn: Callable[..., Any] | None = None, *, name: str | None = None) -> Any
```

Mark the function `nodus run app.py` calls inside an ephemeral run of this App.

### `App.name`

Type: `str`

### `App.registered_entrypoints`

Type: `dict[str, Callable[..., Any]]`

### `App.registered_functions`

Type: `dict[str, _Function]`

### `App.run`

```python
run(*, show_logs: bool = True) -> AsyncIterator[_App]
```

Run the App ephemerally for the duration of the `with` block; it is deleted on exit.
