Proxmox Virtual Environment API
Project description
clientapi_pve
Python SDK for the Proxmox Virtual Environment API. Generated
from the upstream apidoc.js from Proxmox VE 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 the upstream API viewer. https://pve.proxmox.com/.
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.get_nodes()
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 upstream 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clientapi_pve-2026.5.24.tar.gz.
File metadata
- Download URL: clientapi_pve-2026.5.24.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
902db20d16840172ba487a971366ecfb069769afd32af99713864a98621c915a
|
|
| MD5 |
1b9732e1d063c9c15ee5ee586242dd24
|
|
| BLAKE2b-256 |
31fa28ba7e71923e3961c5b0df905edc8fc3f68bbae3bb4ec289d0c566ebc322
|
File details
Details for the file clientapi_pve-2026.5.24-py3-none-any.whl.
File metadata
- Download URL: clientapi_pve-2026.5.24-py3-none-any.whl
- Upload date:
- Size: 2.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ca547cbd79bf27e9ce081182584fdb0d141f57b37f6a9fc558e8fffda49f606
|
|
| MD5 |
3a9466f116ac58a9d7088c07d81e70d7
|
|
| BLAKE2b-256 |
75f1c2d10657c7bed105a35d94fc97b5f696fa5aaaf891a5f939e7eb71a08d89
|