Skip to content

voltagepark/vp-cloud-sdk

Repository files navigation

VP Cloud SDK

⚠️ BETA PREVIEW: This API is currently in beta and is subject to changes. Features, endpoints, request/response formats, and functionality may be modified as we continue to improve the service.

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

Requirements.

Python 3.9+

Installation & Usage

uv (Recommended)

Clone the repository and:

git clone https://github.com/voltagepark/vp-cloud-sdk.git
cd vp-cloud-sdk
uv sync
source .venv/bin/activate

Then import the package:

import vpcloud_client

Tests

Execute pytest to run the tests.

Configuration

Before using the SDK, you need to export the following environment variables:

export VPCLOUD_CLIENT_ID=
export VPCLOUD_CLIENT_SECRET=

Getting Started

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.py

Documentation for API Endpoints

All 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

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication (JWT)

Author

support@voltagepark.com

License

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.

About

Public Python SDK for Voltage Park Cloud

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors