Typed Python client library for SatxCloud API
Project description
satxcloud
Typed Python client library for the SatxCloud API.
Features
- Layered architecture:
client->services->transport - Typed dataclass models for core entities
- Explicit error hierarchy (
ApiError,TransportError,AuthenticationError) - Support for
X-API-KeyandBearerauth modes - Public endpoints available without API key
Installation
pip install satxcloud
Quick Start
from satxcloud import SatxCloudClient, ApiError
client = SatxCloudClient(api_key="YOUR_KEY")
try:
plans = client.catalog.list_plans() # no auth required
print(plans[0].id, plans[0].name)
servers = client.servers.list_servers() # auth required
for s in servers:
print(s.vmid, s.name, s.server_type, s.status)
except ApiError as e:
print(e.status_code, e.error_code, e.message)
Architecture
satxcloud.client.SatxCloudClient: composition root and public facadesatxcloud.transport.HttpTransport: HTTP concerns, auth headers, error mappingsatxcloud.services.catalog.CatalogService: plans and availabilitysatxcloud.services.servers.ServersService: server lifecycle operationssatxcloud.models: typed API entities and operation results
Service Methods
Catalog
list_plans()plans_availability()
Servers
list_servers()create_server(...)server_details(vmid)server_status(vmid)start(vmid)stop(vmid)restart(vmid)renew(vmid, months=None)change_password(vmid, new_password=None)create_backup(vmid)list_backups(vmid)restore_backup(vmid, volid)delete_backup(vmid, volid)reinstall_os(vmid, template, password=None)
Development
pip install -e .[dev]
pytest
Release to PyPI
python -m build
python -m twine check dist/*
python -m twine upload dist/*
For TestPyPI:
python -m twine upload --repository testpypi dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
satxcloud-0.2.0.tar.gz
(30.9 kB
view details)
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 satxcloud-0.2.0.tar.gz.
File metadata
- Download URL: satxcloud-0.2.0.tar.gz
- Upload date:
- Size: 30.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5187b11d2a2dff7c909d2d9ba1abdbca364209d8386978527be04f83bceb985
|
|
| MD5 |
54066abc8743c2cc1a3270267bb22d8f
|
|
| BLAKE2b-256 |
d4139586de4e198a9c3edaeb6c5ddc62cee5a9b843508005a6262de209192570
|
File details
Details for the file satxcloud-0.2.0-py3-none-any.whl.
File metadata
- Download URL: satxcloud-0.2.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3acdb3a5a86067c46d855faf7a9befd280c54b3dcae057d2a9bb2030772ec2af
|
|
| MD5 |
d3b4431c1fc8c8f66f61ec79dffc3b63
|
|
| BLAKE2b-256 |
be32741c3f5f1222618345daa2591f758fdff59ada87b812f257251a3726bc97
|