Wrapper Classes

The Amorphic SDK provides enhanced wrapper classes that simplify authentication, provide helper utilities, and offer a more user-friendly interface to the underlying OpenAPI client.

Overview

The wrapper classes provide:

  • AmorphicApiClient: Enhanced API client with built-in authentication, version checking, and logging

  • TokenFetcher: Utility for fetching PAT tokens from various sources (environment variables, AWS SSM, Secrets Manager)

  • HelpCommand: Comprehensive help system for discovering and exploring available APIs

Key Benefits

  • Simplified Authentication: Automatic token management from multiple sources

  • Discovery Tools: Built-in help system to explore available APIs and methods

Quick Start

import certifi
from openapi_client.amorphic_api_client import AmorphicApiClient
from openapi_client.api.datasets_api import DatasetsApi

# Create authenticated client
client = AmorphicApiClient.create_with_auth(
    host="https://your-instance.amorphic.com/api",
    role_id="your-role-id",
    ssl_ca_cert=certifi.where(),
    debug=False,
    aws_profile=None,
    env_var='PAT_TOKEN'
)

# Use with any API
datasets_api = DatasetsApi(client)

Available Classes