knime-geospatial-extension
knime-geospatial-extension copied to clipboard
Use credentials for API keys instead of plain text strings
All node that use/require an API key should support a credentials flow variable which can be used via the get_credentials(identifier: str)→ Credential method.
Ideally we wait until the Python framework supports credentials (AP-21962).
The dropdown box for credentials variables can be created like this:
@knext.parameter_group(label="Credentials")
class CredentialsSettings:
credentials_param = knext.StringParameter(
label="Credentials parameter",
description="Credentials parameter name for accessing Google Search API key.",
choices=lambda a: knext.DialogCreationContext.get_credential_names(a),
)
For details see the src/agents/base.py of the knime-python-llm repository.