source

ApiError

 ApiError (status_code:Optional[int]=None, body:Optional[Any]=None)

Common base class for all non-exit exceptions.


source

NixtlaClient

 NixtlaClient (api_key:Optional[str]=None, base_url:Optional[str]=None,
               timeout:int=60, max_retries:int=6, retry_interval:int=10,
               max_wait_time:int=360)

Client to interact with the Nixtla API.

TypeDefaultDetails
api_keyOptionalNoneThe authorization api_key interacts with the Nixtla API.
If not provided, will use the NIXTLA_API_KEY environment variable.
base_urlOptionalNoneCustom base_url.
If not provided, will use the NIXTLA_BASE_URL environment variable.
timeoutint60Request timeout in seconds. Set this to None to disable it.
max_retriesint6The maximum number of attempts to make when calling the API before giving up.
It defines how many times the client will retry the API call if it fails.
Default value is 6, indicating the client will attempt the API call up to 6 times in total
retry_intervalint10The interval in seconds between consecutive retry attempts.
This is the waiting period before the client tries to call the API again after a failed attempt.
Default value is 10 seconds, meaning the client waits for 10 seconds between retries.
max_wait_timeint360The maximum total time in seconds that the client will spend on all retry attempts before giving up.
This sets an upper limit on the cumulative waiting time for all retry attempts.
If this time is exceeded, the client will stop retrying and raise an exception.
Default value is 360 seconds, meaning the client will cease retrying if the total time
spent on retries exceeds 360 seconds.
The client throws a ReadTimeout error after 60 seconds of inactivity. If you want to
catch these errors, use max_wait_time >> 60.

Now you can start to make forecasts! Let’s import an example:

Distributed

Spark

Dask

Ray