AB SDK

Python SDK for the ABConnect API ecosystem — ACPortal, Catalog, and ABC APIs.

Installation

pip install -e .

Quick Start

from ab import ABConnectAPI

api = ABConnectAPI(env="staging")

# Get a company
company = api.companies.get_by_id("93179b52-3da9-e311-b6f8-000c298b59ee")
print(company.name)

# List catalogs
catalogs = api.catalog.list()

# Get current user's contact info
me = api.contacts.get_current_user()
print(me.full_name)

Configuration

Set credentials via environment variables with the ABCONNECT_ prefix:

export ABCONNECT_USERNAME=myuser
export ABCONNECT_PASSWORD=mypass
export ABCONNECT_CLIENT_ID=myapp
export ABCONNECT_CLIENT_SECRET=my-secret-uuid
export ABCONNECT_ENVIRONMENT=staging

Or use a .env.staging / .env.production file.

API Reference

Model Reference

Guides

See also: Mock Tracking (MOCKS.md)