Menu
Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version
Publication date

Mar 9, 2022

Confidentiality
Public
Reactions
1
Share

ComputedParam

Read-only param whose value is derived from other params via an expression.

The user cannot submit a value for a ComputedParam. The value is recomputed on every save and on every read by ConfigSpecs.compute_values(...).

Attributes
PRIVATE_VISIBILITY: LiteralPROTECTED_VISIBILITY: LiteralPUBLIC_VISIBILITY: Literaladditional_info: dict | Nonedefault_value: Optionalhuman_name: str | Noneinvalid_reason: str | Noneis_valid: booloptional: boolshort_description: str | Nonevisibility: Literal
Functions
__init__
expression : str
visibility : ParamSpecVisibilty - public
Visibility of the param, see doc on type ParamSpecVisibilty for more info
human_name : str | None
Human readable name of the param, showed in the interface
short_description : str | None
Description of the param, showed in the interface
build

Method call before the value is used (in task or view) to apply some transformation if needed by the ParamSpec. This does not affect the value in the database.

value : Any
Return type : Any
get_default_value
Return type : Any
to_dto
Return type : ParamSpecDTO
to_simple_dto
Return type : ParamSpecSimpleDTO
validate

Validate the value of the param and return the modified value if needed. This method is called when the param is set in the config before saving it in the database. The returned value must be serializable in json.

value : Any
Return type : Any
empty @classmethod
Return type : ComputedParam
get_param_spec_type @classmethod
Return type : ParamSpecType
load_from_dto @classmethod
spec_dto : ParamSpecDTO
validate : bool - False
Return type : ComputedParam
Shine Logo
Technical bricks to reuse or customize

Have you developed a brick?

Share it to accelerate projects for the entire community.