Client

Initialize

Client(api_key=None, timeout=30)

Create a new API client.

The client provides a Logger facility, so you can attach your own logger. Here we are using the Console API as logger. You can write your own custom logger, but you have to follow the same interface as the Console logger.

Arguments

Parameter Type Description Required
api_key string Your API key Yes
timeout integer Connection timeout in seconds (default is 30 seconds) No

Returns

This call returns the API client object.

Example

import os
import objectia

APIKEY = os.environ.get("OBJECTIA_APIKEY")

client = objectia.Client(api_key=API_KEY, timeout=60)

Get client version

client.version()

Gets the API client version

Arguments

None

Returns

This call returns the version number as a string.

Example

v = client.version()
print("Client version: {0}".format(v))   # prints "1.0.0"