New docs experience.Faster search, cleaner navigation, and Ask Kevin in the corner.
OmniDimension

Client

OmniDimension client SDK reference. The Client class is the main entry point for the SDK and provides access to every API domain.

The Client class is the main entry point for the OmniDimension SDK. It handles authentication, request management, and provides access to all API domains.

Installation

Install the SDK from PyPI:

pip install omnidimension

Package details and version history live at pypi.org/project/omnidimension.

Initialization

Initialize the Client with your API key:

import os
from omnidimension import Client

# Initialize with default production URL
api_key = os.environ.get('OMNIDIM_API_KEY', 'your_api_key_here')
client = Client(api_key)

Client structure

client.agent           # Agent operations
client.call            # Call operations
client.knowledge_base  # Knowledge base operations
client.phone_number    # Phone number operations

Error handling

The SDK provides an APIError class to handle API-specific errors. Here's how to use it:

import os
from omnidimension import Client, APIError

api_key = os.environ.get('OMNIDIM_API_KEY', 'your_api_key_here')
client = Client(api_key)

try:
    # Make an API request
    response = client.agent.list()
    print(response)
except APIError as e:
    print(f"API Error ({e.status_code}): {e.message}")
except Exception as e:
    print(f"Unexpected error: {str(e)}")

Client parameters

Prop

Type

On this page