ui_generator#

stellarphot.settings.ui_generator(model, max_field_width=None, file_chooser_max_width=None)[source]#

Generate a user interface with ipyautoui with a few default settings.

Parameters:
modelpydantic.BaseModel subclass

The model to generate the user interface for.

max_field_widthstr, optional

The width of the fields in the user interface. Default is None, which will use the default width of the fields. The value is passed on to the layout.width attribute of the fields, which can be any valid CSS width. These typically include units, e.g. “100px” or “10em”.

file_chooser_max_widthstr, optional

The width of the file chooser fields in the user interface. Default is None, which will use the default width of the fields. This is separate from max_field_width because the FileChooser widget uses a different layout that is less cluttered than the fields.