config
module core.types.config
class StricterBaseModel
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class StrictFilePath
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
classmethod path_should_exist
path_should_exist(v: 'str', info: 'ValidationInfo') → str
class StrictDirectoryPath
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
classmethod path_should_exist
path_should_exist(v: 'str', info: 'ValidationInfo') → str
class StrictIPAdress
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class TimeDict
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
method as_datetime_time
as_datetime_time() → time
class PartialTimeDict
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class GeneralConfig
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class PartialGeneralConfig
Like GeneralConfig
, but all fields are optional.
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class OpusConfig
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class PartialOpusConfig
Like OpusConfig
, but all fields are optional.
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class CamtrackerConfig
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class PartialCamtrackerConfig
Like CamtrackerConfig
but all fields are optional.
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class ErrorEmailConfig
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class PartialErrorEmailConfig
Like ErrorEmailConfig
but all fields are optional.
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class MeasurementDecisionConfig
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class PartialMeasurementDecisionConfig
Like MeasurementDecisionConfig
but all fields are optional.
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class MeasurementTriggersConfig
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class PartialMeasurementTriggersConfig
Like MeasurementTriggersConfig
but all fields are optional.
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class TumPlcConfig
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class PartialTumPlcConfig
Like TumPlcConfig
, but all fields are optional.
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class HeliosConfig
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class PartialHeliosConfig
Like HeliosConfig
, but all fields are optional.
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class UploadStreamConfig
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class UploadConfig
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class PartialUploadConfig
Like UploadConfig
, but all fields are optional.
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
class Config
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
method dump
dump(with_filelock: 'bool' = True) → None
method load
load(
config_object: 'Optional[str | dict[Any, Any]]' = None,
with_filelock: 'bool' = True,
ignore_path_existence: 'bool' = False
) → Config
Load the config file.
Args:
- `config_object`: If provided, the config file will be ignored and the provided content will be used instead. Defaults to None.
- `with_filelock`: If True, the config file will be locked during loading. Defaults to True.
- `ignore_path_existence`: If True, the existence of the file and directory paths used in the whole config file will not be checked. Defaults to False.
Returns: The loaded config object.
Raises:
- `ValueError`: If the config file is invalid.
method update_in_context
update_in_context() → Generator[Config, None, None]
Update the confug file in a context manager.
Example:
with Config.update_in_context() as state:
config.somesetting = somevalue
The file will be locked correctly, so that no other process can interfere with the config file and the state.
class PartialConfig
Like Config
, but all fields are optional.
property model_extra
Get extra fields set during validation.
Returns:
A dictionary of extra fields, or None
if config.extra
is not set to "allow"
.
property model_fields_set
Returns the set of fields that have been explicitly set on this model instance.
Returns: A set of strings representing the fields that have been set, i.e. that were not filled from defaults.
method load
load(
config_object: 'str',
ignore_path_existence: 'bool' = False
) → PartialConfig
Load a partial config file.
Args:
- `config_object`: JSON string containing a partial config.
- `ignore_path_existence`: If True, the existence of the file and directory paths used in the whole config file will not be checked. Defaults to False.
Returns: The loaded partial config object.
Raises:
- `ValueError`: If the config file is invalid.