Daisys API top-level object

class daisys.factory.DaisysAPI(product='speak', version='v1', email: str | None = None, password: str | None = None, access_token: str | None = None, refresh_token: str | None = None, daisys_url: str = 'https://api.daisys.ai', auth_url: str = 'https://api.daisys.ai')

Factory class to get a Daisys API client.

This class is intended (but not required) to be used in a with or async with clause.

__init__(product='speak', version='v1', email: str | None = None, password: str | None = None, access_token: str | None = None, refresh_token: str | None = None, daisys_url: str = 'https://api.daisys.ai', auth_url: str = 'https://api.daisys.ai')

Initialize the factory object for a given product and version.

This object is intended to be short lived, only used to provide a client object.

Login or token details be be optionally provided. If they are not provided here, they may be later provided to the client by calling client.login().

Parameters:
  • product – The product to retrieve a client for.

  • version – The version of the product to retrieve a client for.

  • email – Optionally, email to use for logging in.

  • password – Optionally, password to use for logging in.

  • access_token – Optionally, access token to use. Specify if login was already performed.

  • refresh_token – Optionally, refresh token to use. Specify if login was already performed.

  • daisys_url – For overriding default API URL, usually not needed.

  • auth_url – For overriding default authentication URL, usually not needed.

get_async_client() DaisysAsyncSpeakClientV1

Retrieve a client for asynchronous usage of the Daisys Speak API.

get_client() DaisysSyncSpeakClientV1

Retrieve a client for synchronous usage of the Daisys Speak API.