1. Set up the python-MCS-SDK
Last updated
Last updated
To begin using Swan Storage, you need to install and configure the python-MCS-SDK.
Ensure you have Python 3.7 or later installed on your system.
For information about how to get the latest version of Python, see the official Python documentation.
Install the latest python-MCS-SDK release via pip:
pip install python-MCS-SDK
Before using the SDK, you need to generate an API key from the MCS website.
Generate an API key
Save your API key securely
To use python-MCS-SDK, you must first import it and state your identity.
from swan_mcs import APIClient
import logging
# Set logging level to be sure that you can see the info level message
logging.basicConfig(level=logging.INFO)
# Let's initialize the Python-MCS-SDK
mcs_api = APIClient("<API_KEY>")
If you see "Login Successful" in the console, you have logged in successfully. The following code will take you through the initialization of services.
from swan_mcs import BucketAPI
# Init bucket client
bucket_client = BucketAPI(mcs_api)