All Products
Search
Document Center

Alibaba Cloud SDK:Integrate SDK dependencies

Last Updated:Jul 09, 2024

When you use Alibaba Cloud SDK V1.0 for Python for development, you must correctly integrate the Core SDK and SDKs of Alibaba Cloud services as dependencies. This topic describes how to configure and manage these dependencies.

Before you use Alibaba Cloud SDK V1.0 for Python, you must install the core library aliyun-python-sdk-core. For example, if you want to use the SDK of Elastic Compute Service (ECS), you must install the aliyun-python-sdk-core and aliyun-python-sdk-ecs libraries.

Note

The core library aliyun-python-sdk-core is automatically installed when you install the dependency library aliyun-python-sdk-ecs.

Run the pip command to install an SDK as a dependency

  1. Install the core library.

pip install aliyun-python-sdk-core
  1. Install the SDK of an Alibaba Cloud service. In this example, perform the following steps to install ECS SDK:

    1. Go to SDK Center.

    2. In the top navigation bar, move the pointer over Cloud Products and choose Computing > Elastic Compute Service.

    3. On the page that appears, select an API version. If multiple versions are available, select the recommended or latest version.

    4. Set the SDK Version parameter to V1.0.

    5. Set the All languages parameter to Python.

    6. Copy the command from the Installation Method section, paste the command to the terminal, and then run the command.

pip install aliyun-python-sdk-ecs