Skip to main content

Proxmox Virtual Environment API

Project description

clientapi_pve

Python SDK for the Proxmox Virtual Environment (PVE) API. Generated from the upstream apidoc.js via openapi-generator-cli with custom Mustache template overrides.

Not an official Proxmox project. Community SDK derived from the upstream apidoc.js. Always verify against https://pve.proxmox.com/pve-docs/api-viewer/.

Requires Python ≥ 3.9.

Install

pip install clientapi_pve

Or for development:

pip install -r requirements.txt

Usage

from clientapi_pve import Configuration, Pve

cfg = Configuration(
    host='https://pve1.example.com:8006/api2/json',
    api_key={'Authorization': 'PVEAPIToken=user@realm!tokenid=uuid-secret'},
)
pve = Pve(configuration=cfg)

# Per-tag properties are lazily instantiated and share the same ApiClient.
status = pve.qemu.qemu_vm_status(node='pve1', vmid=100)
nodes = pve.nodes.nodes_index()

The unified Pve class wraps each per-tag API class (QemuApi, LxcApi, ClusterApi, NodesApi, …) so consumers don't need to instantiate them individually.

Compound configs

PVE encodes many fields as CLI-style shorthand strings (net0=virtio,bridge=vmbr0,firewall=1). Round-trip helpers are emitted for every compound config schema:

from clientapi_pve.models import PveQemuNetConfig

cfg = PveQemuNetConfig(model='virtio', bridge='vmbr0', firewall=1)
shorthand = cfg.to_shorthand()  # → 'virtio,bridge=vmbr0,firewall=1'

parsed = PveQemuNetConfig.from_shorthand(shorthand)

Indexed families

Numbered properties (net0..net31, mp0..mp255, …) are exposed on every model as a single collapsed nets / mps / … field:

req = QemuCreateVmRequest(
    nets={
        0: 'virtio,bridge=vmbr0',
        3: 'e1000,bridge=vmbr1',
    },
)
# Wire format: { 'net0': 'virtio,bridge=vmbr0', 'net3': 'e1000,bridge=vmbr1' }

License

Apache 2.0 — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clientapi_pve-2026.5.23.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clientapi_pve-2026.5.23-py3-none-any.whl (2.8 MB view details)

Uploaded Python 3

File details

Details for the file clientapi_pve-2026.5.23.tar.gz.

File metadata

  • Download URL: clientapi_pve-2026.5.23.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for clientapi_pve-2026.5.23.tar.gz
Algorithm Hash digest
SHA256 bc4f9138efa15ff850c8faa5bd83c4eea9f27d6141a0bd7d3ea7ddfb2344165a
MD5 d1d925eff7ada56c4771b782f23beede
BLAKE2b-256 a08964071da329fc4875d6e8b70ca1bab23329a2ce8ce446314700c23794476b

See more details on using hashes here.

File details

Details for the file clientapi_pve-2026.5.23-py3-none-any.whl.

File metadata

File hashes

Hashes for clientapi_pve-2026.5.23-py3-none-any.whl
Algorithm Hash digest
SHA256 83bc9da03cab25e70c56f34f88cf2fe39afaae45e1a17bb71ae43e9b35d6da78
MD5 d820156ea82fc4f79d18c900d046cc45
BLAKE2b-256 2f246aa5fba1323eb2521bbee7d10512349ec885bcb0754bafd282aa9a1644e2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page