Initialize Client | Python SDK | Teradata AppCenter - 2.0 - Initializing the Teradata AppCenter Client - Teradata AppCenter

Teradata® AppCenter Python SDK User Guide

prodname
Teradata AppCenter
vrm_release
2.0
created_date
September 2020
category
Programming Reference
User Guide
featnum
B035-1119-090K

Before you can use the Teradata® AppCenter Python SDK, you must initiate the AppCenter client.

  1. Use one of the following methods to initialize the AppCenter client:
    Method Code Example Considerations
    import and create a client
    from appcenter_sdk.client import AppContext
    from appcenter_sdk.client import DefaultAppCenterClient 
    import logging
    
    with DefaultAppCenterClient() as client:
    All context information is initialized from environment variables.
    Create and initialize a client with AppContext
    appContext = AppContext(app_center_base_url='https://appcenter.example.com',system='aster-system’)
    
    with DefaultAppCenterClient(appContext) as client:
    None