Yandex Cloud SDK for Python
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.
Warnings
- breaking Regenerating protocol buffers may introduce breaking changes in the SDK.
- gotcha Ensure that the IAM token used has sufficient permissions to list clouds.
Install
-
pip install yandexcloud
Imports
- SDK
from yandexcloud import SDK
- ListCloudsRequest
from yandex.cloud.resourcemanager.v1.cloud_service_pb2 import ListCloudsRequest
- CloudServiceStub
from yandex.cloud.resourcemanager.v1.cloud_service_pb2_grpc import CloudServiceStub
Quickstart
import os
import yandexcloud
from yandex.cloud.resourcemanager.v1.cloud_service_pb2 import ListCloudsRequest
from yandex.cloud.resourcemanager.v1.cloud_service_pb2_grpc import CloudServiceStub
# Initialize the SDK with IAM token
sdk = yandexcloud.SDK(iam_token=os.environ.get('YC_IAM_TOKEN'))
# Create a client for the CloudServiceStub
cloud_service = sdk.client(CloudServiceStub)
# List clouds
clouds = cloud_service.List(ListCloudsRequest()).clouds
# Print cloud names
for cloud in clouds:
print(cloud.name)