Skip to content

Latest commit

 

History

History
48 lines (33 loc) · 1.36 KB

sdk-python.md

File metadata and controls

48 lines (33 loc) · 1.36 KB

Object Storage Python SDK

Overview

Python can also be used to access the CWM Object Storage instances. The Python SDK provides all the APIs to perform operations similar to MinIO Client (mc).

For more details on the MinIO Client, please see the CLI documentation.

Default Ports

The default ports for a CWM MinIO instance are:

  • HTTP: 80
  • HTTPS: 443

Endpoint Prefix

The endpoint listed for a CWM Object Storage instance i.e. ACCESS API URL on the CWM Object Storage Management Console may contain the protocol prefix e.g. https://. You do not need the prefix with the JavaScript API to connect to the CWM Object Storage instance.

You can consult the API reference for the up-to-date information.

Connect to CWM Object Storage Instance

The following snippet creates and establishes an HTTPS connection on port 443 with a CWM Object Storage instance:

from minio import Minio
from minio.error import S3Error

client = Minio(
    "123345678.eu-test.cloudwm-obj.com",
    access_key="<ACCESS_KEY>",
    secret_key="<SECRET_KEY>",
)

For more details, please refer to the official docs: