• Object Storage Service

  1. Help Center
  2. Object Storage Service
  3. Developer Guide (Python SDK)
  4. Initialization
  5. Creating an Instance of ObsClient

Creating an Instance of ObsClient

# Import the module.
from com.obs.client.obs_client import ObsClient

# Create an instance of ObsClient.
obsClient = ObsClient(
    access_key_id='*** Provide your Access Key ***',
    secret_access_key='*** Provide your Secret Key ***',

# Use the instance to access OBS.

# Close obsClient.
  • The project can contain one or more instances of ObsClient.
  • ObsClient is thread-safe and can be simultaneously used by multiple threads.