Skip to content

Commit 1d6b084

Browse files
committed
chore: sync from pve-openapi@5bf8363
docs(py): fix README method names + use kebab-case PyPI install line
1 parent 66462ca commit 1d6b084

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Requires Python ≥ 3.9.
1313
## Install
1414

1515
```bash
16-
pip install clientapi_pve
16+
pip install clientapi-pve
1717
```
1818

1919
Or for development:
@@ -34,10 +34,25 @@ cfg = Configuration(
3434
pve = Pve(configuration=cfg)
3535

3636
# Per-tag properties are lazily instantiated and share the same ApiClient.
37-
status = pve.qemu.qemu_vm_status(node='pve1', vmid=100)
38-
nodes = pve.nodes.nodes_index()
37+
# `removeOperationIdPrefix=true` strips the tag prefix from method names,
38+
# so the call is `pve.qemu.vm_status(...)`, not `pve.qemu.qemu_vm_status(...)` —
39+
# you're already inside the `qemu` namespace.
40+
status = pve.qemu.vm_status(node='pve1', vmid=100)
41+
nodes = pve.nodes.index()
3942
```
4043

44+
### Discovering available methods
45+
46+
Each per-tag API class lives at `clientapi_pve.api.<tag>_api.<Tag>Api`.
47+
List its methods to see what's callable:
48+
49+
```python
50+
print([m for m in dir(pve.qemu) if not m.startswith('_')])
51+
```
52+
53+
Generated method-level docstrings explain parameters; the upstream
54+
endpoint reference is the [PVE API viewer][pve-api].
55+
4156
The unified `Pve` class wraps each per-tag API class (`QemuApi`,
4257
`LxcApi`, `ClusterApi`, `NodesApi`, …) so consumers don't need to
4358
instantiate them individually.
@@ -77,3 +92,4 @@ req = QemuCreateVmRequest(
7792
Apache 2.0 — see [LICENSE](./LICENSE).
7893

7994
[gen]: https://openapi-generator.tech
95+
[pve-api]: https://pve.proxmox.com/pve-docs/api-viewer/

0 commit comments

Comments
 (0)