Official Python SDK for the WAYSCloud API
Project description
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")
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
License
MIT — see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wayscloud-0.2.3.tar.gz.
File metadata
- Download URL: wayscloud-0.2.3.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f157be9934bb6222e828f2d986788f5313a99062a2ca7aacfe78617e332f254a
|
|
| MD5 |
288b60c2249e43e9f51e9738e407d602
|
|
| BLAKE2b-256 |
97956466c4c95f3f63d25ca57e765595ec72aab8a59a68699797a55447dc2d9f
|
Provenance
The following attestation bundles were made for wayscloud-0.2.3.tar.gz:
Publisher:
publish.yml on wayscloudas/wayscloud-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wayscloud-0.2.3.tar.gz -
Subject digest:
f157be9934bb6222e828f2d986788f5313a99062a2ca7aacfe78617e332f254a - Sigstore transparency entry: 1239401949
- Sigstore integration time:
-
Permalink:
wayscloudas/wayscloud-python-sdk@0766b9536ca72c11e74cc670695e332b7369e38f -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/wayscloudas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0766b9536ca72c11e74cc670695e332b7369e38f -
Trigger Event:
push
-
Statement type:
File details
Details for the file wayscloud-0.2.3-py3-none-any.whl.
File metadata
- Download URL: wayscloud-0.2.3-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13fec8c63bde3d7a93c7aa16b18720a49078325f623ed6aa563da492357f7d74
|
|
| MD5 |
33e962d568ab4cf3152b4c64a8a465a2
|
|
| BLAKE2b-256 |
09a1688e2112b1925865aa3c51870d7ef2ab290687ac791269a5b527e8c30ede
|
Provenance
The following attestation bundles were made for wayscloud-0.2.3-py3-none-any.whl:
Publisher:
publish.yml on wayscloudas/wayscloud-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wayscloud-0.2.3-py3-none-any.whl -
Subject digest:
13fec8c63bde3d7a93c7aa16b18720a49078325f623ed6aa563da492357f7d74 - Sigstore transparency entry: 1239401956
- Sigstore integration time:
-
Permalink:
wayscloudas/wayscloud-python-sdk@0766b9536ca72c11e74cc670695e332b7369e38f -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/wayscloudas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0766b9536ca72c11e74cc670695e332b7369e38f -
Trigger Event:
push
-
Statement type: