{"id":27628,"library":"byteplus-python-sdk-v2","title":"Byteplus Python SDK V2","description":"Official Byteplus (Volcengine) SDK for Python. Current version: 3.0.43, supports Python >=2.7. Frequent releases (every few weeks). Provides client libraries for various Byteplus services like ECS, VPC, IAM, etc.","status":"active","version":"3.0.43","language":"python","source_language":"en","source_url":"https://github.com/byteplus-sdk/byteplus-python-sdk-v2","tags":["byteplus","volcengine","sdk","cloud"],"install":[{"cmd":"pip install byteplus-python-sdk-v2","lang":"bash","label":"Default install"}],"dependencies":[{"reason":"HTTP client used by the SDK","package":"requests","optional":false}],"imports":[{"note":"SDK v2 uses package name 'byteplus' not 'byteplus_sdk'","wrong":"import byteplus_sdk","symbol":"VodService","correct":"from byteplus.vod import VodService"},{"note":"In SDK v2 the client class is AcsClient, not DefaultAcsClient (which was from v1)","wrong":"from byteplus.core import DefaultAcsClient","symbol":"AcsClient","correct":"from byteplus.core import AcsClient"}],"quickstart":{"code":"from byteplus.core import AcsClient\nfrom byteplus.vpc.v20200515 import vpc_client\nimport os\n\nclient = AcsClient(\n    ak=os.environ.get('BYTEPLUS_ACCESS_KEY', 'your_ak'),\n    sk=os.environ.get('BYTEPLUS_SECRET_KEY', 'your_sk'),\n    region='cn-north-1'\n)\nvpc = vpc_client.VpcClient(client)\nresponse = vpc.describe_vpcs()\nprint(response)","lang":"python","description":"Initialize a client and call a simple VPC API."},"warnings":[{"fix":"Use 'from byteplus.core import AcsClient' and per-service client modules.","message":"SDK v2 is a complete rewrite. Import paths and class names differ from v1 (e.g., 'AcsClient' instead of 'DefaultAcsClient'). Do not mix v1 and v2 imports.","severity":"breaking","affected_versions":"v2.0+"},{"fix":"Always pass 'region' when creating AcsClient.","message":"Some services require explicit region parameter; default region may not work. If API calls fail with 'not found', check region.","severity":"gotcha","affected_versions":"all"},{"fix":"Use Python 3.6+. If using Python 2, be aware of limited support.","message":"The SDK requires Python >=2.7 but supports Python 3. However, some dependencies may be Python 2 only. Always use Python 3.6+ for production.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Install with 'pip install byteplus-python-sdk-v2' and use import 'byteplus' (not 'byteplus_sdk').","cause":"Package not installed or wrong package name.","error":"ModuleNotFoundError: No module named 'byteplus'"},{"fix":"Uninstall old versions: 'pip uninstall byteplus-sdk' and reinstall v2.","cause":"Old SDK v1 installed alongside v2, or import path incorrect.","error":"AttributeError: module 'byteplus' has no attribute 'core'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}