Python library for Proxmox VE API
Project description
ProxmoxVE Web API
这个项目是ProxmoxVE Web API的Python库
安装
pip install pve-api
示例
from pve_api import PVE
# 创建PVE对象
pve = PVE('192.168.1.100', 'root', 'password')
# 获取主节点
node = pve.get_nodes().query('node', 'pve')
# 获取当前节点下的qemu虚拟机中名为debian的虚拟机
qemu = node.get_qemu().query('name', 'debian')
# 获取虚拟机当前状态
status = qemu.get_status()
# 输出虚拟机当前状态
print(status)
链式操作
from pve_api import PVE
print(PVE('192.168.1.100', 'root', 'password').get_nodes().query('node', 'pve').get_qemu().query('name', 'debian').get_status().status)
输出:
QemuStatusEnum.STOPPED
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
pve_api-1.1.3.tar.gz
(10.4 kB
view details)
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
pve_api-1.1.3-py3-none-any.whl
(14.1 kB
view details)
File details
Details for the file pve_api-1.1.3.tar.gz.
File metadata
- Download URL: pve_api-1.1.3.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2435bc6267cf8dce4faea9d988de6970a5ff04fa137546b589fe588c65170cab
|
|
| MD5 |
13a05ae30f6b05006461f21a4414b986
|
|
| BLAKE2b-256 |
8756e90fc7a427bda5d2fbcd0960708f1b9651bba4e9c3dd0a1065cee3a15b35
|
File details
Details for the file pve_api-1.1.3-py3-none-any.whl.
File metadata
- Download URL: pve_api-1.1.3-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa3203878911afdb344f8c0dccc864103f8828066e53d1c639fc3cfcd8366b0c
|
|
| MD5 |
a9024349fc38beb71008cfcaac4da30c
|
|
| BLAKE2b-256 |
58b2d7e7ff04a9e10bcd1fa57042fa8069f006b6bf96ce233722f56656896bfe
|