Bare Metal and VM provisioning and management services.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0-beta
- Package version: 1.0.0
- Generator version: 7.16.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Python 3.9+
Clone the repository and:
git clone https://github.com/voltagepark/vp-cloud-sdk.git
cd vp-cloud-sdk
uv sync
source .venv/bin/activateThen import the package:
import vpcloud_clientExecute pytest to run the tests.
Before using the SDK, you need to export the following environment variables:
export VPCLOUD_CLIENT_ID=
export VPCLOUD_CLIENT_SECRET=Please follow the installation procedure and then run the following:
import os
import json
import vpcloud_client
from vpcloud_client.rest import ApiException
# Configure Auth0 M2M authentication using client credentials
# The SDK will automatically exchange these for an access token
# Defining the host is optional and defaults to https://api.sea1.voltagepark.com
# See configuration.py for a list of all supported configuration parameters.
configuration = vpcloud_client.Configuration(
host = "https://api.sea1.voltagepark.com",
client_id = os.environ["VPCLOUD_CLIENT_ID"],
client_secret = os.environ["VPCLOUD_CLIENT_SECRET"]
)
# Enter a context with an instance of the API client
with vpcloud_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = vpcloud_client.FleetsApi(api_client)
try:
# List your fleets
api_response = api_instance.list_fleets()
print("The response of FleetsApi->list_fleets:\n")
# Convert response to dict for cleaner output
print(json.dumps(api_response.model_dump(), indent=2))
except ApiException as e:
print("Exception when calling FleetsApi->list_fleets: %s\n" % e)Save this example to a file (e.g., example.py) and run it with:
source .venv/bin/activate
python3 example.pyAll URIs are relative to https://api.sea1.voltagepark.com
| Class | Method | HTTP request | Description |
|---|---|---|---|
| FleetsApi | get_fleet | GET /v1/fleets/{fleetId} | Get fleet details |
| FleetsApi | get_fleet_health | GET /v1/fleets/{fleetId}/health | Get fleet health metrics |
| FleetsApi | list_fleets | GET /v1/fleets | List your fleets |
| MonitoringApi | get_fleet_grafana_dashboards | GET /v1/fleets/{fleetId}/services/grafana | Get Grafana dashboards for a specific fleet |
| MonitoringApi | list_fleet_grafana_dashboards | GET /v1/fleets/services/grafana | List Grafana dashboards for all fleets |
| NodeOperationsApi | remediate_nodes | POST /v1/fleets/{fleetId}/nodes/remediate | Fix unhealthy nodes |
| NodesApi | get_node_by_fleet_id | GET /v1/fleets/{fleetId}/nodes/{nodeId} | Get node details |
| NodesApi | list_nodes_by_fleet_id | GET /v1/fleets/{fleetId}/nodes | List nodes in a fleet |
- Bootstrap
- ErrorResponse
- ExpandableCapacity
- ExpandableNodeSpec
- ExternalStorageConfig
- Fleet
- FleetApps
- FleetAppsMksCluster
- FleetComputeFootprint
- FleetHealthResponse
- FleetNode
- FleetNodeSpec
- GetFleetHealth422Response
- GrafanaDashboardResponse
- Infrastructure
- KubernetesServiceLinks
- ListFleetsResponse
- ListNodesResponse
- Node
- NodeHealth
- RemediateNodeRequest
- RemediateNodeResponse
- SlurmParameters
- SlurmParametersSshKeysInner
- StorageConfig
Authentication schemes defined for the API:
- Type: Bearer authentication (JWT)
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
The generated SDK includes third-party dependencies. For a complete list of dependencies and their licenses, see THIRD_PARTY_LICENSES.txt. All dependencies are compatible with the Apache License 2.0.