Added
- Autocompleted parameter types may declare dependent parameters.
For instance, a parameter 'city' may declare that its completed values depend on another parameter 'country':
class CityParameterType(StringParameterType):
autocompletion_depends_on_parameters: list[str] = ["country"]
def autocomplete(self,
query_terms: list[str],
depend_on_parameter_values: list[Any],
context: PluginContext) -> list[Autocompletion]:
'depend_on_parameter_values' contains the value of the country parameter
return ...
- Password plugin parameter type.
Passwords will be encrypted in the backend and not shown to users:
Plugin(label="My Plugin")
class MyTestPlugin(TransformPlugin):
def __init__(self, password: Password):
self.password = password
The decrypted password can be accessed using:
self.password.decrypt()
- Custom parameter types can be registered. See implementation of PasswordParameterType for an example.
Migration Notes
The signature of the autocomplete function has been changed.
All autocomplete implementations need to be updated to the following signature:
`def autocomplete(self, query_terms: list[str], depend_on_parameter_values: list[Any], context: PluginContext) -> list[Autocompletion]`
Parameters using the old signature will continue to work for one release, but a warning will be printed in the log.
The same applies to the label function that has been updated to the following signature:
`def label(self, value: str, depend_on_parameter_values: list[Any], context: PluginContext) -> Optional[str]`