Skip to main content

kc-sdk-python — Kvindo Cloud Python SDK

PyPI version Python versions License: MIT

Official Python SDK / client for the Kvindo Cloud API — manage cloud infrastructure as code from Python: VMs, volumes, S3 object storage, Kubernetes, load balancers, VPCs, VPNs, and managed PostgreSQL.

A thin, typed client over the REST API: one resource client per resource type, all sharing the same create / read / update / delete / list contract.

Using Claude Code? This repo ships a Claude Code skill that teaches Claude how to script Kvindo Cloud with this SDK — clone this repo (or otherwise have it on disk) and open Claude Code there to pick it up automatically.

Install

pip install kc-sdk-python

Dependencies: requests, marshmallow-dataclass, py-ulid.

Usage

from kc_api import KcClient

client = KcClient("YOUR_API_TOKEN")  # api_url defaults to https://cloud-api.kvindo.ru
# TLS certificate verification is on by default (verify_ssl=True). Pass
# verify_ssl=False only to point this SDK at a genuinely self-hosted instance
# with a self-signed cert.

# List (label-filtered, paginated)
resp = client.vms.get_by_labels({"env": "prod"}, max_page_size=50)
for vm in resp.resources:
    print(vm["metadata"]["name"])

# Read one
vm = client.vms.read("01H...")
print(vm.resource)

# Create / update (async) then wait for it to reconcile
created = client.vms.create_or_update({
    "metadata": {"name": "my-vm", "folderId": "01H..."},
    "spec": {"offerId": "g3-1c2-100", "state": "running", ...},
})
status = client.vms.wait_request_satisfied(created.requestId, timeout_seconds=300)
assert status.succeeded

# Delete (optionally block until reconciled)
client.vms.delete("01H...", wait=True)

Create / update / delete are asynchronous: they return a requestId; poll read_request(requestId) or use wait_request_satisfied(...). Every response object carries errorMessage / errorCode (a typed KcApi*ErrorCode) which are None on success.

Timeouts

Every HTTP call is bounded by kc_api.DEFAULT_HTTP_TIMEOUT — a (connect, read) pair, 5 s and 30 s. Without it a peer that accepts the TCP connection and then stops responding blocks the caller forever; requests sets no session-level timeout, so there is nothing else to break the wait. The client also retries 5 times, so a single logical call can legitimately take several minutes before it gives up.

Override it when your workload needs a different budget — a 30 s read is sized for the largest platform payload, not for a slow query of your own:

import kc_api

kc_api.DEFAULT_HTTP_TIMEOUT = (10, 120)   # before constructing the client

Available resources

KcClient exposes one KcResourceClient per type, e.g. client.vms, client.volumes, client.s3_buckets, client.kubernetes, client.load_balancers, client.vpcs, client.postgresqls, client.folders, client.transactions, … (the surface mirrors the official Kvindo Cloud API).

Part of the Kvindo Cloud developer toolchain:

License

MIT

Metadata

Release files for kc-sdk-python 5.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kc-sdk-python 5.4.0
File Size Uploaded Provenance Actions
kc_sdk_python-5.4.0.tar.gz 17.8 kB Without provenance Details for kc_sdk_python-5.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kc-sdk-python 5.4.0
File Interpreter ABI Platform Actions
kc_sdk_python-5.4.0-py3-none-any.whl Python 3 none any Details for kc_sdk_python-5.4.0-py3-none-any.whl

Total release size: 33.8 kB

Release files / kc_sdk_python-5.4.0.tar.gz

Download URL kc_sdk_python-5.4.0.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3b928a325c8ebfe11de228abd06527c22eae92e355dd554328162dd0630a1796
BLAKE2b-256 checksum
How to use checksums
39101d9a293e08c239ae856b3924ae3de5fd2da055e81dd5f578faa145166708
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.4

Release files / kc_sdk_python-5.4.0-py3-none-any.whl

Download URL kc_sdk_python-5.4.0-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
855c23020b3caca9846708bf5e2a8e1229ae8703500f2f970758ad617db81a62
BLAKE2b-256 checksum
How to use checksums
f3a7c8652fdf456b3dc4391d2a2f655300d824ed35d34f2b85f7e2d377c24cb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.4

Security for kc-sdk-python 5.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page