Registry / aws / volcengine-python-sdk

volcengine-python-sdk

JSON →
library5.0.47pypypi✓ verified 22d ago

The Volcengine SDK for Python provides comprehensive access to Volcengine cloud services, including compute, storage, networking, and AI. It is currently at version 5.0.23 and receives frequent minor updates adding new services and API versions.

pip install volcengine-python-sdk
INSTALL
IMPORT
SIG · VOLCENGINE-PYTHON-
V
volcengine-python-sdk
awspythonv5.0.47
Install
29.5s avg
Import
583ms
Disk
529MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v5.0.47 · 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.630s · 496.6MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 29.5s · import 0.536s · 497MB
529MB installed
● package 529MB
Code
Verified usage

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

ACEPApi
from volcenginesdkacep import ACEPApi
from volcengine.client import Client
ADVDEFENCEApi
from volcenginesdkadvdefence import ADVDEFENCEApi
from volcengine.client import Client
AIDAPApi
from volcenginesdkaidap import AIDAPApi
from volcengine.client import Client

This quickstart initializes an IAMService client using environment variables for credentials and then attempts to list the access keys associated with the account. This demonstrates basic client setup and a simple API call.

import os from volcengine.iam.IAMService import IAMService # Set your Volcengine Access Key (AK) and Secret Key (SK) as environment variables # or replace with actual credentials. NEVER hardcode production credentials. VOLCENGINE_AK = os.environ.get("VOLCENGINE_AK", "YOUR_AK") VOLCENGINE_SK = os.environ.get("VOLCENGINE_SK", "YOUR_SK") if VOLCENGINE_AK == "YOUR_AK" or VOLCENGINE_SK == "YOUR_SK": print("Please set VOLCENGINE_AK and VOLCENGINE_SK environment variables or replace placeholders.") exit(1) try: # Initialize the IAM service client iam_service = IAMService() iam_service.set_ak(VOLCENGINE_AK) iam_service.set_sk(VOLCENGINE_SK) # Default region is cn-beijing. You can set it explicitly if needed: # iam_service.set_region("cn-beijing") # Example: List up to 10 access keys for the current account print("Attempting to list access keys...") resp = iam_service.list_access_keys({"Limit": 10}) if resp.get("ResponseMetadata", {}).get("Error"): error_message = resp["ResponseMetadata"]["Error"]["Message"] print(f"Error listing access keys: {error_message}") else: access_keys = resp.get("Result", {}).get("AccessKeys", []) print(f"Successfully listed {len(access_keys)} access keys.") for key in access_keys: print(f" Access Key Id: {key.get('AccessKeyId')}, Status: {key.get('Status')}") except Exception as e: print(f"An error occurred: {e}")
Debug
Known issues
gotchaMissing or incorrect authentication credentials (Access Key and Secret Key) are the most common cause of API request failures. Ensure 'VOLCENGINE_AK' and 'VOLCENGINE_SK' environment variables are correctly set or provided to the client.
fix
Set environment variables `VOLCENGINE_AK` and `VOLCENGINE_SK` or use `client.set_ak()` and `client.set_sk()` with valid credentials. Verify your credentials in the Volcengine console.
affects: All versions
gotchaVolcengine services are region-specific. Making requests to a service endpoint in a region where the service is not deployed, or using the wrong region for your resources, will result in errors.
fix
Explicitly set the region using `client.set_region('your-region')` (e.g., 'cn-beijing') and verify that the service you are trying to access is available in that region. Some services may also require a specific `set_service_host()`.
affects: All versions
gotchaThe SDK offers a generic `volcengine.client.Client` and numerous service-specific clients (e.g., `volcengine.iam.IAMService`). The generic client requires manual construction of `ServiceInfo` and `APIInfo` for each call, while service-specific clients provide type-hinted methods for ease of use.
fix
For specific service interactions, prefer importing and using the dedicated service client (e.g., `from volcengine.ecs.ECSService import ECSService`). Use the generic `volcengine.client.Client` when needing more dynamic API call patterns or for services without a dedicated client wrapper.
affects: All versions
Upgrade
Version history
5.0.47latest on PyPI · released Aug 27, 2026
Audit
Dependencies
requestsrequiredRequired for making HTTP requests to Volcengine APIs.
cryptographyoptionalOptional dependency for KMS (Key Management Service) related operations.
pyyamloptionalOptional dependency for loading configurations from YAML files.
Agent activity
83 hits · last 30 days
node
78
Resources
volcengine-python-sdk — pip install volcengine-python-sdk · libregistry