Need to automate your infrastructure or use services provided by Yandex.Cloud? We've got you covered.
Installation:
pip install yandexcloud
There are several options for authorization your requests - OAuth Token, Metadata Service (if you're executing code inside VMs or Functions running in Yandex.Cloud) and Service Account Keys
sdk = yandexcloud.SDK(token='AQAD-.....')Don't forget to assign Service Account for your Instance or Function and grant required roles.
sdk = yandexcloud.SDK()# 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)Check examples directory for more examples.
Use make deps command to install library, its production and development dependencies.
Use make format to autoformat code with black tool.
make testto run tests for current python versionmake lintto run only linters for current python versionmake tox-currentto run all checks (tests + code style checks + linters + format check) for current python versionmake toxto run all checks for all supported (installed in your system) python versionsmake test-all-versionsto run all checks for all supported python versions in docker container
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.