yandexcloud 0.364.0


pip install yandexcloud

  Latest version

Released: Oct 20, 2025

Project Links

Meta
Author: Yandex LLC
Requires Python: >=3.9

Classifiers

Programming Language
  • Python
  • Python :: 3
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13

PyPI Version Build Status License

Yandex.Cloud SDK (Python)

Need to automate your infrastructure or use services provided by Yandex.Cloud? We've got you covered.

Installation:

pip install yandexcloud

Getting started

There are several options for authorization your requests - OAuth Token, Metadata Service (if you're executing your code inside VMs or Cloud Functions running in Yandex.Cloud), Service Account Keys, and externally created IAM tokens.

OAuth Token

sdk = yandexcloud.SDK(token='AQAD-.....')

Metadata Service

Don't forget to assign Service Account for your Instance or Function and grant required roles.

sdk = yandexcloud.SDK()

Service Account Keys

# you can store and read it from JSON file
sa_key = {
    "id": "...",
    "service_account_id": "...",
    "private_key": "..."
}

sdk = yandexcloud.SDK(service_account_key=sa_key)

IAM tokens

sdk = yandexcloud.SDK(iam_token="t1.9eu...")

Check examples directory for more examples.

Override service endpoint

Supported services

Service Name Alias
yandex.cloud.ai.foundation_models ai-foundation-models
yandex.cloud.ai.llm ai-llm
yandex.cloud.ai.ocr ai-vision-ocr
yandex.cloud.ai.stt ai-stt
yandex.cloud.ai.translate ai-translate
yandex.cloud.ai.tts ai-speechkit
yandex.cloud.ai.vision ai-vision
yandex.cloud.apploadbalancer alb
yandex.cloud.billing billing
yandex.cloud.cdn cdn
yandex.cloud.certificatemanager.v1.certificate_content_service certificate-manager-data
yandex.cloud.certificatemanager certificate-manager
yandex.cloud.compute compute
yandex.cloud.containerregistry container-registry
yandex.cloud.dataproc.manager dataproc-manager
yandex.cloud.dataproc dataproc
yandex.cloud.datasphere datasphere
yandex.cloud.datatransfer datatransfer
yandex.cloud.dns dns
yandex.cloud.endpoint endpoint
yandex.cloud.iam iam
yandex.cloud.iot.devices iot-devices
yandex.cloud.k8s managed-kubernetes
yandex.cloud.kms.v1.symmetric_crypto_service kms-crypto
yandex.cloud.kms kms
yandex.cloud.loadbalancer load-balancer
yandex.cloud.loadtesting loadtesting
yandex.cloud.lockbox.v1.payload_service lockbox-payload
yandex.cloud.lockbox lockbox
yandex.cloud.logging.v1.log_ingestion_service log-ingestion
yandex.cloud.logging.v1.log_reading_service log-reading
yandex.cloud.logging logging
yandex.cloud.marketplace marketplace
yandex.cloud.mdb.clickhouse managed-clickhouse
yandex.cloud.mdb.elasticsearch managed-elasticsearch
yandex.cloud.mdb.greenplum managed-greenplum
yandex.cloud.mdb.kafka managed-kafka
yandex.cloud.mdb.mongodb managed-mongodb
yandex.cloud.mdb.mysql managed-mysql
yandex.cloud.mdb.opensearch managed-opensearch
yandex.cloud.mdb.postgresql managed-postgresql
yandex.cloud.mdb.redis managed-redis
yandex.cloud.mdb.sqlserver managed-sqlserver
yandex.cloud.operation operation
yandex.cloud.organizationmanager organization-manager
yandex.cloud.resourcemanager resource-manager
yandex.cloud.serverless.apigateway.websocket apigateway-connections
yandex.cloud.serverless.apigateway serverless-apigateway
yandex.cloud.serverless.containers serverless-containers
yandex.cloud.serverless.functions serverless-functions
yandex.cloud.serverless.triggers serverless-triggers
yandex.cloud.spark managed-spark
yandex.cloud.storage storage-api
yandex.cloud.trino trino
yandex.cloud.vpc vpc
yandex.cloud.ydb ydb

Override in client

from yandex.cloud.vpc.v1.network_service_pb2_grpc import NetworkServiceStub
from yandexcloud import SDK

sdk = SDK(iam_token="t1.9eu...")
new_network_client_endpoint = "example.new.vpc.very.new.yandex:50051"
insecure = False # by default is False, but if server does not support verification can be set to True
network_client = sdk.client(NetworkServiceStub, endpoint=new_network_client_endpoint, insecure=False)

Override in sdk config

To override endpoints provide dict in format {alias : new-endpoint}

from yandex.cloud.vpc.v1.network_service_pb2_grpc import NetworkServiceStub
from yandexcloud import SDK
new_network_client_endpoint = "example.new.vpc.very.new.yandex:50051"
sdk = SDK(iam_token="t1.9eu...", endpoints={"vpc": new_network_client_endpoint})
insecure = False # by default is False, but if server does not support verification can be set to True
network_client = sdk.client(NetworkServiceStub, insecure=False)

Notice: if both overrides are used for same endpoint, override by client has priority

Switch SDK region

from yandexcloud import SDK, set_up_yc_api_endpoint
kz_region_endpoint = "api.yandexcloud.kz"
# this will make SDK list endpoints from KZ yc installation
sdk = SDK(iam_token="t1.9eu...", endpoint="api.yandexcloud.kz")
# or you can use global function
set_up_yc_api_endpoint(kz_region_endpoint)

Retries

SDK provide built-in retry policy, that supports exponential backoff and jitter, and also retry budget. It's necessary to avoid retry amplification.

import grpc
from yandexcloud import SDK, RetryPolicy

sdk = SDK(retry_policy=RetryPolicy())

SDK provide different modes for retry throttling policy:

  • persistent is suitable when you use SDK in any long-lived application, when SDK instance will live long enough for manage budget;
  • temporary is suitable when you use SDK in any short-lived application, e.g. scripts or CI/CD.

By default, SDK will use temporary mode, but you can change it through throttling_mode argument.

Contributing

Dependencies

We use uv to manage dependencies and run commands in Makefile. Install it with official standalone installer: curl -LsSf https://astral.sh/uv/install.sh | sh

Installing dependencies

Use make deps command to install library, its production and development dependencies.

Adding new project dependency with uv

uv add cryptography

Adding new optional dependency with uv

add to dev extras section uv add pre-commit --group dev

add to genproto extras section uv add grpcio-tools --group genproto

Git hooks

Setup pre-commit and commit-msg hooks with make git-hooks command.

Formatting

Use make format to autoformat code with black tool.

Tests

  • make test to run tests for current python version
  • make lint to run only linters for current python version
  • make tox-current to run all checks (tests + code style checks + linters + format check) for current python version
  • make tox to run all checks for all supported (installed in your system) python versions
  • make test-all-versions to run all checks for all supported python versions in docker container

Run Github Actions locally

Use https://github.com/nektos/act

Maintaining

If pull request consists of several meaningful commits, that should be preserved, then use "Rebase and merge" option. Otherwise use "Squash and merge".

New release (changelog, tag and pypi upload) will be automatically created on each push to master via Github Actions workflow.

0.364.0 Oct 20, 2025
0.363.0 Oct 13, 2025
0.362.0 Oct 06, 2025
0.361.0 Sep 22, 2025
0.360.0 Sep 15, 2025
0.359.0 Sep 08, 2025
0.358.0 Sep 01, 2025
0.357.0 Aug 25, 2025
0.356.0 Aug 18, 2025
0.355.0 Aug 11, 2025
0.354.0 Aug 04, 2025
0.353.0 Jul 28, 2025
0.352.0 Jul 21, 2025
0.351.0 Jul 14, 2025
0.350.0 Jun 23, 2025
0.349.0 Jun 16, 2025
0.348.0 Jun 09, 2025
0.347.0 May 26, 2025
0.346.0 May 20, 2025
0.345.0 May 19, 2025
0.344.0 May 14, 2025
0.343.0 May 12, 2025
0.342.0 May 05, 2025
0.341.0 Apr 25, 2025
0.340.0 Apr 15, 2025
0.339.0 Apr 10, 2025
0.338.0 Apr 10, 2025
0.337.0 Mar 19, 2025
0.336.0 Mar 10, 2025
0.335.0 Mar 03, 2025
0.334.0 Feb 24, 2025
0.333.0 Feb 17, 2025
0.332.0 Feb 10, 2025
0.331.0 Jan 27, 2025
0.330.0 Dec 23, 2024
0.329.0 Dec 16, 2024
0.328.0 Dec 09, 2024
0.327.0 Dec 04, 2024
0.326.0 Dec 02, 2024
0.325.0 Nov 18, 2024
0.324.0 Nov 04, 2024
0.323.0 Oct 28, 2024
0.322.0 Oct 21, 2024
0.321.0 Oct 14, 2024
0.320.0 Oct 07, 2024
0.319.0 Sep 19, 2024
0.318.0 Sep 19, 2024
0.317.0 Sep 17, 2024
0.316.0 Sep 04, 2024
0.315.0 Aug 30, 2024
0.314.0 Aug 28, 2024
0.313.0 Aug 20, 2024
0.312.0 Aug 14, 2024
0.311.0 Aug 13, 2024
0.310.0 Aug 06, 2024
0.309.0 Aug 02, 2024
0.308.0 Jul 30, 2024
0.307.0 Jul 30, 2024
0.306.0 Jul 23, 2024
0.305.0 Jul 22, 2024
0.304.0 Jul 19, 2024
0.303.0 Jul 19, 2024
0.302.0 Jul 17, 2024
0.301.0 Jul 16, 2024
0.300.0 Jul 03, 2024
0.299.0 Jul 02, 2024
0.298.0 Jun 25, 2024
0.297.0 Jun 24, 2024
0.296.0 Jun 21, 2024
0.295.0 Jun 19, 2024
0.294.0 Jun 17, 2024
0.293.0 Jun 01, 2024
0.292.0 May 31, 2024
0.291.0 May 31, 2024
0.290.0 May 31, 2024
0.289.0 May 30, 2024
0.288.0 May 30, 2024
0.287.0 May 29, 2024
0.286.0 May 28, 2024
0.285.0 May 28, 2024
0.283.0 May 24, 2024
0.282.0 May 16, 2024
0.281.0 May 16, 2024
0.280.0 May 15, 2024
0.279.0 May 15, 2024
0.278.0 May 02, 2024
0.277.0 May 02, 2024
0.276.0 May 02, 2024
0.275.0 May 02, 2024
0.274.0 May 02, 2024
0.273.0 May 02, 2024
0.272.0 May 02, 2024
0.271.0 Apr 01, 2024
0.270.0 Mar 27, 2024
0.269.0 Mar 27, 2024
0.268.0 Mar 26, 2024
0.267.0 Mar 19, 2024
0.266.0 Mar 18, 2024
0.265.0 Mar 14, 2024
0.264.0 Mar 12, 2024
0.263.0 Mar 06, 2024
0.262.0 Mar 01, 2024
0.261.0 Feb 28, 2024
0.260.0 Feb 20, 2024
0.259.0 Feb 13, 2024
0.258.0 Feb 09, 2024
0.257.0 Feb 06, 2024
0.256.0 Feb 03, 2024
0.255.0 Jan 30, 2024
0.254.0 Jan 23, 2024
0.253.0 Jan 16, 2024
0.252.0 Jan 10, 2024
0.251.0 Jan 09, 2024
0.250.0 Dec 29, 2023
0.249.0 Dec 21, 2023
0.248.0 Dec 13, 2023
0.247.0 Dec 12, 2023
0.246.0 Dec 05, 2023
0.245.0 Nov 28, 2023
0.244.0 Nov 21, 2023
0.243.0 Nov 14, 2023
0.242.0 Nov 08, 2023
0.241.0 Oct 31, 2023
0.240.0 Oct 26, 2023
0.239.0 Oct 25, 2023
0.238.0 Oct 24, 2023
0.237.0 Oct 17, 2023
0.236.0 Oct 10, 2023
0.235.0 Oct 03, 2023
0.234.0 Sep 26, 2023
0.233.0 Sep 20, 2023
0.232.0 Sep 19, 2023
0.231.0 Sep 15, 2023
0.230.0 Sep 05, 2023
0.229.0 Aug 29, 2023
0.228.0 Aug 17, 2023
0.227.0 Aug 15, 2023
0.226.0 Aug 11, 2023
0.225.0 Aug 08, 2023
0.224.0 Aug 03, 2023
0.223.0 Jul 27, 2023
0.222.0 Jun 29, 2023
0.221.0 Jun 27, 2023
0.220.0 Jun 20, 2023
0.219.0 Jun 15, 2023
0.218.0 Jun 13, 2023
0.217.0 Jun 10, 2023
0.216.0 May 24, 2023
0.215.0 May 23, 2023
0.214.0 May 23, 2023
0.213.0 May 16, 2023
0.212.0 May 12, 2023
0.211.0 May 03, 2023
0.210.0 Apr 25, 2023
0.209.0 Apr 18, 2023
0.208.0 Apr 11, 2023
0.207.0 Apr 04, 2023
0.206.0 Mar 28, 2023
0.205.0 Mar 21, 2023
0.204.0 Mar 14, 2023
0.203.0 Mar 01, 2023
0.202.0 Feb 28, 2023
0.201.0 Feb 28, 2023
0.200.0 Feb 22, 2023
0.199.0 Feb 21, 2023
0.198.0 Feb 17, 2023
0.197.0 Feb 17, 2023
0.196.0 Feb 14, 2023
0.195.0 Feb 07, 2023
0.194.0 Dec 27, 2022
0.193.0 Dec 20, 2022
0.192.0 Dec 06, 2022
0.191.0 Nov 22, 2022
0.190.0 Nov 15, 2022
0.189.0 Nov 14, 2022
0.188.0 Nov 01, 2022
0.187.0 Oct 28, 2022
0.186.0 Oct 18, 2022
0.185.0 Oct 11, 2022
0.184.0 Sep 27, 2022
0.183.0 Sep 17, 2022
0.182.0 Sep 15, 2022
0.181.0 Sep 13, 2022
0.180.0 Sep 03, 2022
0.179.0 Aug 30, 2022
0.178.0 Aug 16, 2022
0.177.0 Aug 06, 2022
0.176.0 Jul 29, 2022
0.175.0 Jul 19, 2022
0.174.0 Jul 18, 2022
0.173.0 Jul 12, 2022
0.172.0 Jul 12, 2022
0.171.0 Jul 05, 2022
0.170.0 Jun 28, 2022
0.169.0 Jun 28, 2022
0.168.0 Jun 28, 2022
0.167.0 Jun 27, 2022
0.166.0 Jun 21, 2022
0.165.0 Jun 15, 2022
0.164.0 May 31, 2022
0.163.0 May 24, 2022
0.162.0 May 19, 2022
0.161.0 May 12, 2022
0.160.0 May 05, 2022
0.159.0 Apr 28, 2022
0.158.0 Apr 26, 2022
0.157.0 Apr 25, 2022
0.156.0 Apr 25, 2022
0.155.0 Apr 20, 2022
0.154.0 Apr 14, 2022
0.153.0 Apr 12, 2022
0.152.0 Mar 29, 2022
0.151.0 Mar 28, 2022
0.150.0 Mar 22, 2022
0.149.0 Mar 16, 2022
0.148.0 Mar 15, 2022
0.147.0 Mar 08, 2022
0.146.0 Mar 02, 2022
0.145.0 Mar 01, 2022
0.144.0 Feb 28, 2022
0.143.0 Feb 28, 2022
0.142.0 Feb 28, 2022
0.141.0 Feb 28, 2022
0.140.0 Feb 25, 2022
0.139.0 Feb 25, 2022
0.138.0 Feb 25, 2022
0.137.0 Feb 25, 2022
0.136.0 Feb 25, 2022
0.135.0 Feb 24, 2022
0.134.0 Feb 24, 2022
0.133.0 Feb 24, 2022
0.132.0 Feb 24, 2022
0.131.0 Feb 17, 2022
0.130.0 Feb 15, 2022
0.129.0 Feb 08, 2022
0.128.0 Jan 31, 2022
0.127.0 Jan 25, 2022
0.126.0 Jan 17, 2022
0.125.0 Jan 03, 2022
0.124.0 Dec 27, 2021
0.123.0 Dec 16, 2021
0.122.0 Dec 13, 2021
0.121.0 Dec 07, 2021
0.120.0 Dec 06, 2021
0.119.0 Dec 02, 2021
0.118.0 Dec 01, 2021
0.117.0 Nov 30, 2021
0.116.0 Nov 22, 2021
0.115.0 Nov 15, 2021
0.114.0 Nov 10, 2021
0.113.0 Nov 08, 2021
0.112.0 Nov 02, 2021
0.111.0 Nov 01, 2021
0.110.0 Oct 28, 2021
0.109.0 Oct 15, 2021
0.108.0 Oct 06, 2021
0.107.0 Sep 27, 2021
0.106.1 Sep 20, 2021
0.106.0 Sep 20, 2021
0.105.0 Aug 24, 2021
0.104.0 Aug 23, 2021
0.103.0 Aug 16, 2021
0.102.1 Aug 13, 2021
0.102.0 Aug 11, 2021
0.101.0 Aug 09, 2021
0.100.0 Aug 03, 2021
0.99.0 Jul 27, 2021
0.98.0 Jul 19, 2021
0.97.0 Jul 15, 2021
0.96.0 Jul 14, 2021
0.95.0 Jul 14, 2021
0.94.0 Jul 12, 2021
0.93.0 Jul 06, 2021
0.92.0 Jun 28, 2021
0.91.0 Jun 24, 2021
0.90.0 Jun 15, 2021
0.89.0 Jun 07, 2021
0.88.0 May 31, 2021
0.87.0 May 28, 2021
0.86.0 May 25, 2021
0.85.0 May 17, 2021
0.84.0 May 17, 2021
0.83.0 May 11, 2021
0.82.0 Apr 26, 2021
0.81.0 Apr 19, 2021
0.80.0 Apr 13, 2021
0.79.0 Apr 08, 2021
0.78.0 Mar 26, 2021
0.77.0 Mar 22, 2021
0.76.0 Mar 10, 2021
0.75.0 Mar 01, 2021
0.74.0 Feb 24, 2021
0.73.0 Feb 11, 2021
0.72.0 Feb 08, 2021
0.71.0 Feb 04, 2021
0.70.0 Feb 04, 2021
0.69.0 Feb 01, 2021
0.68.0 Jan 25, 2021
0.67.0 Jan 20, 2021
0.66.0 Jan 18, 2021
0.65.0 Dec 28, 2020
0.64.0 Dec 14, 2020
0.63.0 Dec 07, 2020
0.62.0 Nov 30, 2020
0.61.0 Nov 19, 2020
0.60.0 Nov 09, 2020
0.59.1 Nov 05, 2020
0.59.0 Nov 02, 2020
0.58.0 Oct 28, 2020
0.57.0 Oct 26, 2020
0.56.0 Oct 19, 2020
0.55.0 Oct 12, 2020
0.54.0 Oct 08, 2020
0.53.0 Sep 21, 2020
0.52.0 Sep 15, 2020
0.48.0 Aug 31, 2020
0.47.0 Aug 26, 2020
0.46.0 Aug 26, 2020
0.45.0 Jul 27, 2020
0.44.0 Jul 22, 2020
0.43.0 Jul 06, 2020
0.42.0 Jun 22, 2020
0.41.0 Jun 08, 2020
0.40.0 Jun 01, 2020
0.39.0 May 25, 2020
0.38.0 May 18, 2020
0.37.0 May 14, 2020
0.36.0 May 14, 2020
0.35.0 May 08, 2020
0.34.0 Apr 27, 2020
0.33.0 Apr 20, 2020
0.32.0 Apr 13, 2020
0.31.0 Apr 03, 2020
0.30.0 Mar 30, 2020
0.29.0 Mar 24, 2020
0.28.0 Mar 16, 2020
0.27.0 Mar 10, 2020
0.26.0 Mar 02, 2020
0.22.0 Feb 03, 2020
0.20.0 Jan 24, 2020
0.19.1 Jan 21, 2020
0.18.0 Jan 13, 2020
0.13.0 Nov 28, 2019
0.12.0 Nov 20, 2019
0.11.0 Aug 02, 2019
0.10.1 Jul 05, 2019
0.10.0 Jun 18, 2019
0.9.0 Apr 02, 2019
0.8.0 Mar 04, 2019
0.7.1 Dec 27, 2018
0.7 Dec 27, 2018
0.0.0 Dec 16, 2024

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras: None
Dependencies:
cryptography (>=44.0.0)
grpcio (<2,>=1.68.1)
protobuf (<6,>=5.29.1)
googleapis-common-protos (<2,>=1.66.0)
pyjwt (<3,>=2.10.1)
requests (<3,>=2.32.3)
six (<2,>=1.17.0)
grpcio-tools (>=1.68.1)
deprecated (>=1.2.18)