Skip to content

kvikuz/python-sdk

This branch is 337 commits behind yandex-cloud/python-sdk:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

semantic-releaseyandex-cloud-bot
semantic-release
and
Feb 28, 2023
8e3cd2c · Feb 28, 2023
Feb 17, 2023
Feb 28, 2023
Jul 12, 2022
Jul 18, 2022
Feb 28, 2023
Feb 28, 2023
Feb 28, 2022
Feb 21, 2022
Feb 22, 2022
Apr 25, 2022
Jan 24, 2020
Feb 28, 2023
Nov 2, 2018
Oct 29, 2018
Jul 18, 2022
Jul 18, 2022
Feb 28, 2022
Feb 28, 2022
Jun 27, 2022
Jun 28, 2022
Feb 28, 2023
Feb 17, 2023

Repository files navigation

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.

Contributing

Dependencies

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

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

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.

About

Yandex.Cloud Python SDK

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.9%
  • Makefile 0.1%