# minimal

Python reference for `nagasim.modelfmt.minimal`.

`nagasim.modelfmt.minimal`

```python
minimal(layout)
```

Return the shortest form of a model that migrates to the same model.

This is the form ``naga fmt`` writes: defaults the loader would fill in are
left out.

Parameters
----------
layout : str or dict
    A path or a layout dict.

Returns
-------
dict
    The minimal layout.

See Also
--------
nagasim.build.Model : Its ``to_dict`` returns this form.
nagasim.modelschema.build_json_schema : What the form is checked against.

Examples
--------
>>> from pathlib import Path
>>> import nagasim
>>> from nagasim.modelfmt import minimal
>>> path = Path(nagasim.__file__).parent / "models" / "single_server.json"
>>> short = minimal(str(path))
>>> "blocks" in short and "links" in short
True
