Registry / database / aliyun-python-sdk-rds

aliyun-python-sdk-rds

JSON →
library2.7.53pypypi✓ verified 51d ago

Aliyun RDS SDK for Python is the official Alibaba Cloud SDK module for managing ApsaraDB RDS (Relational Database Service). Current version is 2.7.53, released monthly or as needed. It provides APIs to create, configure, and monitor RDS instances, including MySQL, SQL Server, PostgreSQL, and MariaDB.

databaseaws
pip install aliyun-python-sdk-rds
Install & Compatibility
Where this runs
tested against v2.7.53 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.302s · 42.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.1s · import 0.278s · 43MB
41MB installed
● package 41MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Rds
from aliyunsdkrds.request.v20140815 import DescribeDBInstancesRequest
The correct import path uses the versioned subpackage aliyunsdkrds.request.v20140815.
RdsClient
from aliyunsdkcore.client import AcsClient
from aliyunsdkrds.client import RdsClient
The client is from aliyunsdkcore, not aliyunsdkrds.

List all RDS instances in the 'cn-hangzhou' region.

from aliyunsdkcore.client import AcsClient from aliyunsdkrds.request.v20140815 import DescribeDBInstancesRequest import json # Use environment variables or hardcode for testing (not production) client = AcsClient( os.environ.get('ALIBABA_CLOUD_ACCESS_KEY_ID', 'your-access-key-id'), os.environ.get('ALIBABA_CLOUD_ACCESS_KEY_SECRET', 'your-access-key-secret'), 'cn-hangzhou' ) request = DescribeDBInstancesRequest.DescribeDBInstancesRequest() response = client.do_action_with_exception(request) print(json.loads(response))
Debug
Known issues
deprecatedThe old import from 'aliyun.api' or 'rds' module is deprecated. Use versioned requests from aliyunsdkrds.request.
fix
Use 'from aliyunsdkrds.request.v20140815 import ...' instead.
affects: >=2.0.0
breakingThe SDK requires Python 2.7+ or Python 3.4+ but Python 2 support was dropped in later core versions. For Python 3, ensure aliyun-python-sdk-core>=2.13.0.
fix
Use Python 3.6+ and install the latest aliyun-python-sdk-core.
affects: >=2.3.0
gotchaRegion ID must be specified when creating AcsClient; default region not set. Missing region leads to 'RequestId: ...' errors.
fix
Always provide a valid region ID, e.g., 'cn-hangzhou'.
affects: all
gotchaRequest classes are not instantiated with parameters; you must use set_* methods. Common mistake: passing parameters to constructor.
fix
Instantiate request with no args, then call set_* methods like .set_DBInstanceId('xxx').
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'aliyunsdkrds'
Package not installed or environment path issue.
fix
Install with 'pip install aliyun-python-sdk-rds'.
AttributeError: module 'aliyunsdkrds.request' has no attribute 'v20140815'
Incorrect import path or package version too old.
fix
Ensure aliyun-python-sdk-rds >= 2.0.0, import as 'from aliyunsdkrds.request.v20140815 import ...'
aliyunsdkcore.exception.ServerException: HTTP Status: 400 Error: InvalidRegionId.RegionId
Invalid or missing region ID in AcsClient.
fix
Provide a valid region ID like 'cn-hangzhou'.
TypeError: 'AcsClient' object is not callable
Calling client() instead of client.do_action_with_exception().
fix
Use 'response = client.do_action_with_exception(request)'.
Upgrade
Version history
2.7.53latest on PyPI
Audit
Dependencies
aliyun-python-sdk-corerequiredCore SDK dependency providing the base client and authentication.
Agent activity
68 hits · last 30 days
node
10
Amazon
1
ahrefsbot
1
amazonbot
1
bytedance
1
Resources