@connect
Overview
The @connect
decorator is used to wrap functions that handle connections or authentication tasks.
Syntax
Keyword Arguments
Argument
Type
Description
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 not be set. Examples include, but are not limited to:
noun_phrase="api keys"
noun_phrase="client credentials"
noun_phrase="user password authentication"
Implementation Example
This is an example implementation of connecting to the OpenWeather API using an API key:
Refer to connections for additional context and usage examples.
Last updated
Was this helpful?