All Products
Document Center

Alibaba Cloud SDK:Get started with Alibaba Cloud Darabonba SDK for Python

Last Updated:Jan 31, 2023


Alibaba Cloud Darabonba SDK for Python is supported in Python 3.6 or later versions. The Darabonba SDK resolves multiple issues in the Classic SDK. The Darabonba SDK introduces various new features. The Darabonba SDK is easy to understand, lowers the usage barriers, and improves the robustness of the SDK. This user guide describes the new features in detail. This user guide also describes how to use the Darabonba SDK by comparing the differences between the Classic and Darabonba SDKs.

New features

Darabonba SDK for Python is developed based on Darabonba. Darabonba is a domain-specific language (DSL) that is developed by Alibaba Cloud. You can use DSL to compile code in a flexible manner. You can also parse the DSL-generated abstract syntax trees (ASTs) to generate an SDK that is suitable for all types of API operations of different Alibaba Cloud services. For more information about Darabonba, visit The DSL-based Darabonba SDK resolves issues in the Classic SDK and provides the following features:

  1. In the Classic SDK, the APIs of different Alibaba Cloud services vary based on the style, such as remote procedure call (RPC) and resource-oriented architecture (ROA). Therefore, the API operations of the services are called by using different methods. The Darabonba SDK resolves the issue, and the API operations of all Alibaba Cloud services can be called by using the same method.

  2. The DSL-based Darabonba SDK contains complete business logic. This resolves the issue that the Classic SDK is tightly coupled with the core library aliyun-python-sdk-core. This way, the development costs of upgrading SDKs are reduced.

  3. The SDK of each Alibaba Cloud service provides a client object. You can instantiate the client object to call all API operations of the Alibaba cloud service. This implementation of the Darabonba SDK is better than that of the Classic SDK because the Darabonba SDK ensures the security of multiple threads, isolates the identity and authentication information about each Alibaba Cloud service, and does not require multiple Alibaba Cloud services to share one piece of profile information. In the Classic SDK, one SDK client processes multiple threads, and permission management is less efficient. You can configure different parameters to call the API operations of different Alibaba Cloud services. The parameters that you can configure include the region, timeout period, HTTP proxy, and retry mechanism.

  4. The Darabonba SDK is suitable for more complex scenarios. For example, to use Visual Intelligence API (VIAPI) to process an image, you must upload the image to Object Storage Service (OSS), and OSS generates a URL for the image. Then, you can specify the URL in VIAPI, and VIAPI analyzes and processes the image based on artificial intelligence (AI)-based technologies. If you use the Darabonba SDK, the identity authentication, image upload, and image processing can be complete in a simplified manner.

  5. Darabonba SDK for Python provides sample code for all API requests. Darabonba SDK for Python also provides usage scenarios in which multiple API requests are sent. This way, when you use Darabonba SDK for Python, you incur low development costs and you can focus more on your business scenario. For more information about sample code for API requests, visit Sample code for API requests. For more information about usage scenarios, visit Sample Center.

Usage notes

// The Darabonba SDK.
pip install alibabacloud-ecs20140526
// The Classic SDK.
pip install aliyun-python-sdk-ecs

The Darabonba SDK is named in the alibabacloud_{Service name}{API version number} format. For more information about the Darabonba SDK or the Classic SDK of an Alibaba Cloud service, visit SDK Center.