@connect
Last updated
Was this helpful?
Last updated
Was this helpful?
The @connect
decorator is used to wrap functions that handle or authentication tasks. It defines the syntax for writing a , which instantiates the connection in Kognitos to the third-party API or service that's implemented in your Python function.
name
str
A name to associate with the connection. If not provided, it defaults to the function name.
noun_phrase
str
A unique label to identify the authentication method. If not provided, it will be inferred from the function name. Examples include, but are not limited to:
noun_phrase="api keys"
noun_phrase="client credentials"
noun_phrase="user password authentication"
This is an example implementation of connecting to the OpenWeather API using an API key:
Refer to for additional context and usage examples.