{"id":336,"library":"yandexcloud","title":"Yandex Cloud SDK for Python","description":"The official SDK for Yandex Cloud, enabling Python developers to manage Yandex Cloud resources. Current version: 0.383.0, released on March 23, 2026. The SDK is actively maintained with regular updates, primarily focusing on regenerating protocol buffers and supporting newer Python versions.","status":"active","version":"0.383.0","language":"python","source_language":"en","source_url":"https://github.com/yandex-cloud/python-sdk","tags":["Yandex Cloud","SDK","Python","Cloud Computing"],"install":[{"cmd":"pip install yandexcloud","lang":"bash","label":"Install yandexcloud"}],"dependencies":[{"reason":"HTTP library for making requests to Yandex Cloud services.","package":"requests"},{"reason":"Provides cryptographic recipes and primitives.","package":"cryptography"},{"reason":"Python bindings for gRPC, used for communication with Yandex Cloud services.","package":"grpcio"},{"reason":"Python 2 and 3 compatibility library.","package":"six"},{"reason":"gRPC tools for Python, used for generating code from .proto files.","package":"grpcio-tools"},{"reason":"Provides decorators for marking deprecated functions.","package":"deprecated"},{"reason":"JSON Web Token implementation for Python.","package":"pyjwt"},{"reason":"Protocol Buffers implementation for Python.","package":"protobuf"},{"reason":"Common Protobufs for Google APIs.","package":"googleapis-common-protos"}],"imports":[{"note":"Ensure correct import path to access the SDK class.","symbol":"SDK","correct":"from yandexcloud import SDK"},{"note":"Correct import path for ListCloudsRequest.","symbol":"ListCloudsRequest","correct":"from yandex.cloud.resourcemanager.v1.cloud_service_pb2 import ListCloudsRequest"},{"note":"Correct import path for CloudServiceStub.","symbol":"CloudServiceStub","correct":"from yandex.cloud.resourcemanager.v1.cloud_service_pb2_grpc import CloudServiceStub"}],"quickstart":{"code":"import os\nimport yandexcloud\nfrom yandex.cloud.resourcemanager.v1.cloud_service_pb2 import ListCloudsRequest\nfrom yandex.cloud.resourcemanager.v1.cloud_service_pb2_grpc import CloudServiceStub\n\n# Initialize the SDK with IAM token\nsdk = yandexcloud.SDK(iam_token=os.environ.get('YC_IAM_TOKEN'))\n\n# Create a client for the CloudServiceStub\ncloud_service = sdk.client(CloudServiceStub)\n\n# List clouds\nclouds = cloud_service.List(ListCloudsRequest()).clouds\n\n# Print cloud names\nfor cloud in clouds:\n    print(cloud.name)","lang":"python","description":"A simple script to list and print the names of all clouds in your Yandex Cloud account using the SDK."},"warnings":[{"fix":"Review the changelog for specific changes and update your code accordingly.","message":"Regenerating protocol buffers may introduce breaking changes in the SDK.","severity":"breaking","affected_versions":"0.382.0 to 0.383.0"},{"fix":"Verify IAM token permissions in the Yandex Cloud console.","message":"Ensure that the IAM token used has sufficient permissions to list clouds.","severity":"gotcha","affected_versions":"All"},{"fix":"Ensure that the environment where the SDK is running has network access to the metadata server (169.254.169.254). This might involve checking firewall rules, network configurations, or ensuring the instance has an assigned service account and metadata service is available.","message":"Connection to the metadata server (169.254.169.254) timed out while attempting to retrieve service account credentials.","severity":"gotcha","affected_versions":"All"},{"fix":"Ensure that the environment where the code is running has network access to the metadata service (typically 169.254.169.254 on port 80). Verify that no firewall rules, network ACLs, or proxy configurations are blocking the connection to this internal IP. If running in a cloud VM, confirm that the instance metadata service is enabled and reachable from within the VM.","message":"Failed to obtain IAM token from the metadata service due to network connectivity issues (e.g., timeout connecting to 169.254.169.254), leading to StatusCode.UNAVAILABLE.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-05-12T13:09:22.675Z","next_check":"2026-06-26T00:00:00.000Z","problems":[{"fix":"Install the library using `pip install yandex-cloud`.","cause":"The Python package name on PyPI is `yandex-cloud`, but the import statement expects `yandexcloud` directly, leading to a missing module error.","error":"ModuleNotFoundError: No module named 'yandexcloud'"},{"fix":"Ensure your authentication method (e.g., `yc.iam.IamTokenAuth`, `yc.oauth.OAuthTokenAuth`, or environment variables) is correctly configured with valid and non-expired credentials.","cause":"The Yandex Cloud SDK failed to authenticate because the provided credentials (e.g., IAM token, service account key, or API key) are missing, expired, or invalid.","error":"grpc._channel._InactiveRpcError: <_InactiveRpcError of RPC that terminated with: status = StatusCode.UNAUTHENTICATED"},{"fix":"Correct the import statement to `from yandexcloud.sdk import SDK`.","cause":"The main SDK class `SDK` is located within the `yandexcloud.sdk` module, but an attempt was made to import it directly from the top-level `yandexcloud` package.","error":"ImportError: cannot import name 'SDK' from 'yandexcloud'"}],"ecosystem":"pypi","meta_description":null,"install_score":100,"install_tag":"verified","quickstart_score":0,"quickstart_tag":"stale","pypi_latest":null,"install_checks":{"last_tested":"2026-05-12","tag":"verified","tag_description":"installs cleanly on critical runtimes, fast import, recently tested","results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":1.4,"mem_mb":23.2,"disk_size":"124.4M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.59,"mem_mb":17.3,"disk_size":"120M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":1.99,"mem_mb":25.2,"disk_size":"131.5M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.91,"mem_mb":19.5,"disk_size":"127M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":1.97,"mem_mb":25,"disk_size":"131.9M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":1.28,"mem_mb":19.9,"disk_size":"127M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":1.92,"mem_mb":26.3,"disk_size":"131.6M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":1.17,"mem_mb":20.8,"disk_size":"127M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":1.31,"mem_mb":23.1,"disk_size":"124.6M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"default","exit_code":0,"wheel_type":null,"failure_reason":null,"install_time_s":null,"import_time_s":0.69,"mem_mb":17.3,"disk_size":"120M"}]},"quickstart_checks":{"last_tested":"2026-04-23","tag":"stale","tag_description":"widespread failures or data too old to trust","results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":1},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":1},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":1}]}}