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.
# `removeOperationIdPrefix=true` strips the tag prefix from method names,
# so the call is `pve.qemu.vm_status(...)`, not `pve.qemu.qemu_vm_status(...)` —
# you're already inside the `qemu` namespace.
status = pve.qemu.vm_status(node='pve1', vmid=100)
nodes = pve.nodes.index()

Discovering available methods

Each per-tag API class lives at clientapi_pve.api.<tag>_api.<Tag>Api. List its methods to see what's callable:

print([m for m in dir(pve.qemu) if not m.startswith('_')])

Generated method-level docstrings explain parameters; the upstream endpoint reference is the PVE API viewer.

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.post2.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.post2-py3-none-any.whl (2.8 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: clientapi_pve-2026.5.23.post2.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.post2.tar.gz
Algorithm Hash digest
SHA256 84255cb4439517bc4d3d72fb762b705514af819db9f87a1d67a48001e033cd1f
MD5 a0a0b8be421f9039b42a4d854ebd0e7d
BLAKE2b-256 421db723d30dc05f003395194cfe283488ae90efda4c0cec85c5bf2d6978fe2b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for clientapi_pve-2026.5.23.post2-py3-none-any.whl
Algorithm Hash digest
SHA256 cc256b86a4f44313f7a21b77ef6f44f73358e85263e1db370eac396a08d346cb
MD5 d3d737f75bbdfd93d50f56896ae210ec
BLAKE2b-256 d8399a323f84ed183d46209ca1d2212c3fb814db17276babe77b9ec876643441

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