client
¤
Client
¤
Client(
api_key: None | str = None, api_url: None | str = None
)
Client for the Dispatch API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
api_key |
None | str
|
Dispatch API key to use for authentication. Uses the value of the DISPATCH_API_KEY environment variable by default. |
None
|
api_url |
None | str
|
The URL of the Dispatch API to use. Uses the value of the DISPATCH_API_URL environment variable if set, otherwise defaults to the public Dispatch API (DEFAULT_API_URL). |
None
|
Raises:
Type | Description |
---|---|
ValueError
|
if the API key is missing. |
dispatch
¤
dispatch(calls: Iterable[Call]) -> list[DispatchID]
Dispatch function calls.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
calls |
Iterable[Call]
|
Calls to dispatch. |
required |
Returns:
Type | Description |
---|---|
list[DispatchID]
|
Identifiers for the function calls, in the same order as the inputs. |