module
Classes¶
KiaraModuleConfig
¶
Bases: KiaraModel
Base class that describes the configuration a [KiaraModule
][kiara.module.KiaraModule] class accepts.
This is stored in the _config_cls
class attribute in each KiaraModule
class.
There are two config options every KiaraModule
supports:
constants
, anddefaults
Constants are pre-set inputs, and users can't change them and an error is thrown if they try. Defaults are default values that override the schema defaults, and those can be overwritten by users. If both a constant and a default value is set for an input field, an error is thrown.
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/kiara/models/module/__init__.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|
Attributes¶
constants: Dict[str, Any] = Field(default_factory=dict, description='Value constants for this module.')
instance-attribute
class-attribute
¶
defaults: Dict[str, Any] = Field(default_factory=dict, description='Value defaults for this module.')
instance-attribute
class-attribute
¶
Classes¶
Config
¶
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/kiara/models/module/__init__.py
63 64 65 |
|
Functions¶
requires_config(config: Union[Mapping[str, Any], None] = None) -> bool
classmethod
¶
Return whether this class can be used as-is, or requires configuration before an instance can be created.
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/kiara/models/module/__init__.py
43 44 45 46 47 48 49 50 51 52 53 |
|
get(key: str) -> Any
¶
Get the value for the specified configuation key.
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/kiara/models/module/__init__.py
67 68 69 70 71 72 73 74 |
|
create_renderable(**config: Any) -> RenderableType
¶
Source code in /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/kiara/models/module/__init__.py
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
|