elasticai.creator.plugin.plugin_spec#
Module Contents#
Classes#
The specification of a plugin. |
Functions#
inspect spec_type and build an instance of it from the dictionary |
API#
- class elasticai.creator.plugin.plugin_spec.PluginSpec[source]#
The specification of a plugin.
Typically built by reading a dictionary from a toml file and building the spec using <<build_plugin_spec,
build_plugin_spec()>>. The dataclass is only used to provide convenient access to the fields, support type checking and improve code readability.You can achieve your goals just as well with the
PluginDictdictionary. That is defined as an alias fordict[str, str | tuple[str, ...]].- name: str#
None
- target_platform: str#
None
- target_runtime: str#
None
- version: str#
None
- api_version: str#
None
- package: str#
None
- elasticai.creator.plugin.plugin_spec.build_plugin_spec(d: elasticai.creator.plugin.plugin_spec.PluginMap, spec_type: type[elasticai.creator.plugin.plugin_spec.build_plugin_spec.SpecT]) elasticai.creator.plugin.plugin_spec.build_plugin_spec.SpecT[source]#
inspect spec_type and build an instance of it from the dictionary
d.Missing field raise an error while extra fields will be ignored.