CData Python Connector for IBM Cloud Object Storage

Build 25.0.9454

Establishing a Connection

The objects available within our connector are accessible from the "cdata.ibmcloudobjectstorage" module. To use the module's objects directly:

  1. Import the module as follows:
    import cdata.ibmcloudobjectstorage as mod
  2. To establish a connection string, call the connect() method from the connector object using an appropriate connection string, such as:
    mod.connect("ApiKey=myApiKey;CloudObjectStorageCRN=MyInstanceCRN;Region=myRegion;OAuthClientId=MyOAuthClientId;OAuthClientSecret=myOAuthClientSecret;")

Connecting to IBM Cloud Object Storage

To connect to IBM Cloud Object Storage data, set these parameters:

  • InitiateOAuth: GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken.
  • ApiKey: The API key which was noted during setup (see Before You Connect).
  • CloudObjectStorageCRN (Optional): The cloud object storage CRN established during setup (see Before You Connect). The connector attempts to retrieve this automatically, but if you have more than one Cloud Object Storage account, we recommend that you specify this explicitly.

When you connect, the connector completes the OAuth process.

  1. Extracts the access token and authenticates requests.
  2. Saves OAuth values in OAuthSettingsLocation to be persisted across connections.

Copyright (c) 2025 CData Software, Inc. - All rights reserved.
Build 25.0.9454