Skip to main content

Nexqloud DCP Python SDK

Official Python SDK for Nexqloud DCP (Distributed Cloud Platform).

This SDK provides a high-level DCPClient wrapper over the generated API client, with:

  • API key authentication via constructor or DCP_API_KEY
  • Service aliases that match the JavaScript SDK style (dc2, dks, dds, dcr, dss)
  • Configurable timeout and retries
  • Passthrough fetch(...) for authenticated low-level requests

Requirements

  • Python 3.9+
  • A Nexqloud DCP API key

Installation

Install from PyPI:

pip install nexqloud-dcp

The import path remains:

from nexqloud_dcp import DCPClient, DCPClientOptions

Local Development Setup

If you are working from this repository directly, run your scripts with src on PYTHONPATH:

PYTHONPATH=src python your_script.py

Quick Start

import os
from nexqloud_dcp import DCPClient

os.environ["DCP_API_KEY"] = "dcp_your_api_key"

client = DCPClient()

node_types = client.nodeTypes.node_types_controller_find_all()
for node_type in node_types:
    print(node_type.node_type_id, node_type.label)

Authentication

Option 1: Environment variable

export DCP_API_KEY=dcp_your_api_key
from nexqloud_dcp import DCPClient

client = DCPClient()

Option 2: Pass key directly

from nexqloud_dcp import DCPClient, DCPClientOptions

client = DCPClient(
    DCPClientOptions(api_key="dcp_your_api_key")
)

Service Clients

DCPClient exposes service aliases aligned with the TypeScript SDK naming:

  • client.dc2 -> Virtual Machines
  • client.dks -> Kubernetes Clusters
  • client.dds -> Managed Databases
  • client.dcr -> Container Registry
  • client.dss -> Object Storage
  • client.nodeTypes (or client.node_types) -> Node Types
  • client.regions -> Metadata

Usage Examples

List Virtual Machines

from nexqloud_dcp import DCPClient, DCPClientOptions

client = DCPClient(DCPClientOptions(api_key="dcp_your_api_key"))

vms = client.dc2.virtual_machines_controller_find_all()
print(vms)

List Clusters

from nexqloud_dcp import DCPClient, DCPClientOptions

client = DCPClient(DCPClientOptions(api_key="dcp_your_api_key"))

clusters = client.dks.clusters_controller_find_all(query="")
print(clusters)

List Managed Databases

from nexqloud_dcp import DCPClient, DCPClientOptions

client = DCPClient(DCPClientOptions(api_key="dcp_your_api_key"))

databases = client.dds.managed_databases_controller_list_databases(
    include_deleted="false",
    page=1,
    page_size=10,
)
print(databases)

Advanced Configuration

from nexqloud_dcp import DCPClient, DCPClientOptions

client = DCPClient(
    DCPClientOptions(
        api_key="dcp_your_api_key",
        base_url="https://gateway.dcp.nexqloud.net",
        timeout_in_seconds=60,
        max_retries=3,
    )
)

Low-Level Authenticated Requests

Use fetch(...) when you need raw HTTP behavior while still using SDK auth/retry config.

from nexqloud_dcp import DCPClient, DCPClientOptions

client = DCPClient(DCPClientOptions(api_key="dcp_your_api_key"))

response = client.fetch("/api/v1/node-types", method="GET")
response.raise_for_status()
print(response.json())

You can also pass a full URL:

response = client.fetch("https://gateway.dcp.nexqloud.net/api/v1/node-types")

Error Handling

from nexqloud_dcp import DCPClient, DCPClientOptions
from generated.errors import BadRequestError, NotFoundError

client = DCPClient(DCPClientOptions(api_key="dcp_your_api_key"))

try:
    client.dc2.virtual_machines_controller_find_one("vm-id")
except NotFoundError:
    print("VM not found")
except BadRequestError as err:
    print("Bad request:", err)

Notes

  • The generated SDK lives under src/generated.
  • The high-level wrapper lives under src/nexqloud_dcp.
  • Prefer adding custom behavior in src/nexqloud_dcp so regenerated files are not overwritten.

Contributing

See CONTRIBUTING.md for developer setup, SDK regeneration steps, and PR guidelines.

Metadata

Release files for nexqloud-dcp 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nexqloud-dcp 1.0.3
File Size Uploaded Provenance Actions
nexqloud_dcp-1.0.3.tar.gz 87.0 kB With provenance Details for nexqloud_dcp-1.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nexqloud-dcp 1.0.3
File Interpreter ABI Platform Actions
nexqloud_dcp-1.0.3-py3-none-any.whl Python 3 none any Details for nexqloud_dcp-1.0.3-py3-none-any.whl

Total release size: 251.0 kB

Release files / nexqloud_dcp-1.0.3.tar.gz

Download URL nexqloud_dcp-1.0.3.tar.gz
Size 87.0 kB
Tags Source
SHA-256 checksum
How to use checksums
efce69174294634faad971686775497f469e9d53a1ec1197932752072f2bad3a
BLAKE2b-256 checksum
How to use checksums
d210091ddaf548ab7c73a31f4ea6a27340a390b2ab49acc196fcb1c669ab09a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 17, 2026.

Transparency log

Release files / nexqloud_dcp-1.0.3-py3-none-any.whl

Download URL nexqloud_dcp-1.0.3-py3-none-any.whl
Size 164.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3d0c6794e9b6f7838d5eaf472e27f74d5ff86a9961fcfe7d692651426854bfb8
BLAKE2b-256 checksum
How to use checksums
45477cfce7a527c80fa9795335d2794882d70d1eff9262f8f360d4d0d4298a8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 17, 2026.

Transparency log

Security for nexqloud-dcp 1.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nexqloud_dcp-1.0.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page