mxcubeweb.core.models.generic#
Classes
|
|
|
- class mxcubeweb.core.models.generic.AppSettingsModel(*, mode: ModeEnum = ModeEnum.OSC, version: str = '', mesh_result_format: str = 'PNG', use_native_mesh: bool = True, enable_2d_points: bool = True, click_centring_num_clicks: int = 3)[source]#
Bases:
BaseModel- Parameters:
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'click_centring_num_clicks': FieldInfo(annotation=int, required=False, default=3, description='Number of clicks used for the manual click centring'), 'enable_2d_points': FieldInfo(annotation=bool, required=False, default=True, description=' Enable features to work with points in the plane, called2D-points, (none centred positions)'), 'mesh_result_format': FieldInfo(annotation=str, required=False, default='PNG', description='Format of mesh result for display'), 'mode': FieldInfo(annotation=ModeEnum, required=False, default=<ModeEnum.OSC: 'OSC'>, description='MXCuBE mode SSX or OSC'), 'use_native_mesh': FieldInfo(annotation=bool, required=False, default=True, description='Usage of native mesh feature, true by default. The native mesh feature canbe dis-activated to not clash with i.e workflow mesh,'), 'version': FieldInfo(annotation=str, required=False, default='', description='MXCuBE version')}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- class mxcubeweb.core.models.generic.SimpleNameValue(*, name: str, value: bool | str | int)[source]#
Bases:
BaseModel- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'name': FieldInfo(annotation=str, required=True), 'value': FieldInfo(annotation=Union[bool, str, int], required=True)}#
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.