Instantiate the SDK client

Whenever you call the Textual API, you first instantiate the SDK client.

If the API key is configured as the value of TONIC_TEXTUAL_API_KEY, then you do not need to provide the API key when you instantiate the SDK client.

from tonic_textual.api import TonicTextual
textual = TonicTextual("<URL to Tonic Textual>")

If the API key is not configured as the value of TONIC_TEXTUAL_API_KEY, then you must include the API key in the request.

from tonic_textual.api import TonicTextual
textual = TonicTextual("<URL to Tonic Textual>", api_key=<API key>) 

Last updated