Wanna automate your DoubleCloud infrastructure with Python? Let's start.
Run the following in your terminal:
pip install doublecloudThere are a couple of options for authorizing your requests:
- Service Account Keys
- Externally created IAM tokens.
# you can store and read it from a JSON file
sa_key = {
"id": "...",
"service_account_id": "...",
"private_key": "..."
}
sdk = doublecloud.SDK(service_account_key=sa_key)For more information on how to create a service account and authorized keys, see the DoubleCloud documentation.
sdk = doublecloud.SDK(iam_token="t1.9eu...")Check the examples directory for more examples.
For step-by-step instructions and examples of how to get an IAM token for your service account, see the DoubleCloud documentation.
- Use
make venvcommand to install the library, its production and development dependencies. - Use
make submoduleto fetch proto specifications. - Use
make generateto generate wrappers for gRPC services.
Dependencies for the code generator tool are specified in buf.gen.yaml.
Use make format to autoformat code with various set of tools.
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 versions
If a pull request consists of several meaningful commits that should be preserved, use the Rebase and merge option. Otherwise, use Squash and merge.
New release (changelog, tag and pypi upload) will be automatically created on each push to main via Github Actions workflow.