Skip to main content

WAYSCloud Python SDK

Official Python SDK for the WAYSCloud API.

Installation

pip install wayscloud

Authentication

from wayscloud import WaysCloudClient

# Personal Access Token
client = WaysCloudClient(token="wayscloud_pat_...")

# API key
client = WaysCloudClient(api_key="wayscloud_api_...")

# Environment variables (WAYSCLOUD_TOKEN or WAYSCLOUD_API_KEY)
client = WaysCloudClient()

Priority: explicit arguments > environment variables.

Usage

# VPS
for vm in client.vps.list():
    print(vm["hostname"], vm["status"])

# DNS
client.dns.create_record(
    "example.com",
    record_type="A",
    name="www",
    value="192.0.2.1",
)

# Database
db = client.database.create(name="prod", db_type="postgresql")

# Apps
app = client.apps.create(name="my-app", region="eu")

# Storage
client.storage.create_bucket("my-bucket")

# SMS
client.sms.send(to="+4712345678", message="Hello from WAYSCloud")

Kubernetes

client.kubernetes manages Managed Kubernetes clusters (PAT scopes kubernetes:read / kubernetes:write). Create and delete are asynchronous: the API answers 202 with status provisioning / deleting, and wait() blocks until the cluster is running, error, or gone.

# Catalogue
client.kubernetes.plans(region="no", kind="node")
client.kubernetes.regions()
client.kubernetes.versions()
client.kubernetes.estimate(
    plan_code="k8s-cluster-dev",
    node_pools=[{"name": "default", "plan_code": "k8s-node-2c4g", "count": 2}],
)

# Clusters
cluster = client.kubernetes.create(
    "shop",
    node_pools=[{"name": "default", "plan_code": "k8s-node-2c4g", "count": 2}],
    ssh_key_ids=["<ssh-key-id>"],
)
cluster = client.kubernetes.wait(cluster["id"])

client.kubernetes.list()
client.kubernetes.get(cluster["id"])
client.kubernetes.history(cluster["id"])
client.kubernetes.delete(cluster["id"], confirm_name="shop")

# Node pools (labels, taints, per-pool SSH keys)
client.kubernetes.add_node_pool(
    cluster["id"], "workers", "k8s-node-2c4g", 3,
    labels={"role": "worker"},
    taints=[{"key": "dedicated", "value": "gpu", "effect": "NoSchedule"}],
    ssh_key_ids=["<ssh-key-id>"],
)
client.kubernetes.scale_node_pool(cluster["id"], "workers", 5)
client.kubernetes.delete_node_pool(cluster["id"], "workers")

# Access — the kubeconfig is a secret; restrict the API to your CIDRs
client.kubernetes.kubeconfig(cluster["id"])  # YAML text
client.kubernetes.set_api_access(cluster["id"], ["203.0.113.7/32"])

# Public IPs and reverse DNS (allocate/release return the updated cluster)
cluster = client.kubernetes.allocate_ip(cluster["id"])
address = cluster["public_ips"][-1]["address"]
client.kubernetes.set_ptr(cluster["id"], address, "shop.example.com")
client.kubernetes.release_ip(cluster["id"], address)

# Backups
client.kubernetes.backup_policy(cluster["id"])
client.kubernetes.set_backup_policy(cluster["id"], schedule_cron="0 3 * * *", retention_days=14)
client.kubernetes.backups(cluster["id"])
client.kubernetes.backup_now(cluster["id"])
client.kubernetes.restore(cluster["id"], "<backup-id>")

# Upgrades — no backup is taken automatically, create one first
client.kubernetes.available_upgrades(cluster["id"])
client.kubernetes.upgrade(cluster["id"], "1.34")

Error handling

from wayscloud import NotFoundError, AuthenticationError

try:
    client.vps.get("id")
except NotFoundError:
    print("Not found")
except AuthenticationError:
    print("Invalid credentials")

All exceptions inherit from WaysCloudError.

Configuration

Parameter Environment variable Default
token WAYSCLOUD_TOKEN —
api_key WAYSCLOUD_API_KEY —
base_url WAYSCLOUD_API_URL https://api.wayscloud.services
timeout — 30.0

Retries

Automatic retries on 429, 502, 503, 504 with exponential backoff. Respects Retry-After headers.

Requirements

  • Python 3.10+
  • httpx

Changelog

See CHANGELOG.md.

License

MIT — see LICENSE.

Metadata

Release files for wayscloud 0.5.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 wayscloud 0.5.0
File Size Uploaded Provenance Actions
wayscloud-0.5.0.tar.gz 24.7 kB With provenance Details for wayscloud-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wayscloud 0.5.0
File Interpreter ABI Platform Actions
wayscloud-0.5.0-py3-none-any.whl Python 3 none any Details for wayscloud-0.5.0-py3-none-any.whl

Total release size: 50.3 kB

Release files / wayscloud-0.5.0.tar.gz

Download URL wayscloud-0.5.0.tar.gz
Size 24.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1bc4bb98b017cb72e5f2cabb0df02dcfe3f7b1b3a2442e5f2b882d63eebe5ced
BLAKE2b-256 checksum
How to use checksums
526b6dd242005bbce5233b5c5673605a3802c88e675ca57cd78ab5b16c8cba2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Release files / wayscloud-0.5.0-py3-none-any.whl

Download URL wayscloud-0.5.0-py3-none-any.whl
Size 25.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
88ca6730694808312441212cb7ea5f39d1d8a7428ae8d6f3e248efeaf3b94347
BLAKE2b-256 checksum
How to use checksums
a47d757aef4d8a20a68428456d5a8641f91061226f49404eb81dfe24c37d448b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

Security for wayscloud 0.5.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for wayscloud-0.5.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.

Transparency log

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