PythonCodeParam
Param for python code. It shows a simple python IDE in the interface to provide code for python. The value of this param is a string containing the python code with each line separated by a newline character ( ).
:param ParamSpec: _description_
:type ParamSpec: _type_
Attributes
PRIVATE_VISIBILITY: LiteralPROTECTED_VISIBILITY: LiteralPUBLIC_VISIBILITY: Literaladditional_info: Optionaldefault_value: Optionalhuman_name: Optionaloptional: boolshort_description: Optionalvisibility: LiteralFunctions
__init__
default_value :
Optional Default value, if None, and optional is false, the config is mandatory
If a value is provided there is no need to set the optional
Setting optional to True, allows default None value
optional :
bool - False See default value
visibility :
Literal - public Visibility of the param, see doc on type ParamSpecVisibilty for more info
human_name :
Optional Human readable name of the param, showed in the interface
short_description :
Optional 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 :
str empty @classmethod
Return type :
ParamSpec get_additional_infos @classmethod
Return type :
Dict get_default_value_param_spec @classmethod
Return type :
PythonCodeParam get_str_type @classmethod
Return type :
ParamSpecTypeStr load_from_dto @classmethod
spec_dto :
ParamSpecDTO Return type :
ParamSpec to_param_spec_info_specs @classmethod
Return type :
ParamSpecInfoSpecs