# `sandloom.sdk.app`

The application composition root: `create_app` and the derived module list.

Public API 1.0 (spec §2.2, §5.7, Appendix C):

```
app = create_app(default_modules=app_modules("helpdesk.modules"))
```

`from sandloom.sdk.app import <name>`. Signatures in a terminal: `sandloom docs <name>`. Beginner names are the ones generated code and the examples use; any other name is advanced (mark its import line `# sandloom: advanced <reason>` in generated code and examples).

## Advanced

| Name | Kind | Summary |
| --- | --- | --- |
| [`app_modules`](<#app_modules>) | function | The dotted names of `package`'s module packages, sorted by name. |
| [`create_app`](<#create_app>) | function | Build a fully wired Sandloom application (kernel + modules + ops API). |

## Advanced names

### `app_modules`

```
def app_modules(package: str) -> list[str]
```

The dotted names of `package`'s module packages, sorted by name.

A subpackage counts when its `__init__.py` defines `register` (a `define_module(...)` assignment or a `def register`); packages whose name starts with `_` are skipped.

### `create_app`

```
def create_app(
    *,
    default_modules: collections.abc.Sequence[str] = (),
    default_optional_modules: collections.abc.Sequence[str] = (),
    title: str = 'Sandloom Framework',
) -> fastapi.applications.FastAPI
```

Build a fully wired Sandloom application (kernel + modules + ops API).

`default_modules` apply only when the deployment configured no `SANDLOOM_MODULES` (the platform root passes identity/tenancy/billing); with the kernel defaults (empty) the module set comes from configuration alone. Every module is required unless named in `default_optional_modules` (defaulted lists only) or declared `optional=True`.

## Examples and related guides

- [Application quickstart](<https://sandloom.dev/docs/getting-started/index.md>)
- [Python API overview](<https://sandloom.dev/docs/reference/sdk/index.md>)
