Python
The Python client uses HTTP/JSON. The distribution name is platform-sdk;
import platform_sdk.
from platform_sdk import PlatformClient
c = PlatformClient(base_url="http://cloud-api.localhost")print(c.list_instances())print(c.list_instance_types())base_url defaults to PLATFORM_REST or http://127.0.0.1:8080. token
defaults to PLATFORM_TOKEN. app defaults to PLATFORM_APP, then
app_default.
Install
Section titled “Install”python3 -m venv .venvsource .venv/bin/activatepip install -e ./sdk/pythonUse a virtualenv so the package stays in the project. Run that from the repository root.
python3 -m venv .venvsource .venv/bin/activatepip install -e ./sdk/pythonOn Debian/Ubuntu, install python3-venv and python3-pip if venv is
missing.
Install Python 3.9+ and tick Add python.exe to PATH. In PowerShell, from the repository root:
py -3 -m venv .venv.\.venv\Scripts\Activate.ps1pip install -e .\sdk\pythonIf activation is blocked:
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned.