Python Wrapper for the Proxmox 2.x API (HTTP and SSH)
Project description
Proxmoxer is a python wrapper around the Proxmox REST API v2. It currently supports the Proxmox services of Proxmox Virtual Environment (PVE), Proxmox Mail Gateway (PMG), and Proxmox Backup Server (PBS).
It was inspired by slumber, but it is dedicated only to Proxmox. It allows not only REST API use over HTTPS, but the same api over ssh and pvesh utility.
Like Proxmoxia, it dynamically creates attributes which responds to the attributes you’ve attempted to reach.
Full Documentation is available at https://proxmoxer.github.io/docs/
Migrating to version 2
Full instructions for the minimal steps needed to update to version 2 can be found in Migration Docs.
Installation
pip install proxmoxer
To use the ‘https’ backend, install requests
pip install requests
To use the ‘ssh_paramiko’ backend, install paramiko
pip install paramiko
To use the ‘openssh’ backend, install openssh_wrapper
pip install openssh_wrapper
Short usage information
The first thing to do is import the proxmoxer library and create ProxmoxAPI instance.
from proxmoxer import ProxmoxAPI
proxmox = ProxmoxAPI(
"proxmox_host", user="admin@pam", password="secret_word", verify_ssl=False
)
This will connect by default to PVE through the ‘https’ backend.
Note: ensure you have the required libraries (listed above) for the connection method you are using
Queries are exposed via the access methods get, post, put and delete. For convenience two synonyms are available: create for post, and set for put.
Using the paths from the PVE API v2, you can create API calls using the access methods above.
>>> for node in proxmox.nodes.get():
... for vm in proxmox.nodes(node["node"]).qemu.get():
... print(f"{vm['vmid']}. {vm['name']} => {vm['status']}")
...
141. puppet-2.london.example.com => running
101. munki.london.example.com => running
102. redmine.london.example.com => running
140. dns-1.london.example.com => running
126. ns-3.london.example.com => running
113. rabbitmq.london.example.com => running
See Changelog in CHANGELOG.md
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 proxmoxer-2.2.0.tar.gz.
File metadata
- Download URL: proxmoxer-2.2.0.tar.gz
- Upload date:
- Size: 29.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.8.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ed63a58e5c0822841afdb3801f9d913a4996955c1c54f7319b5842ba2615006
|
|
| MD5 |
aeb2a56faad5c5fbfa39ffc9ce1c77bf
|
|
| BLAKE2b-256 |
6a54dc2919eed681ca31220a9021e35935a3995335069b520279b4d55b9df822
|
File details
Details for the file proxmoxer-2.2.0-py3-none-any.whl.
File metadata
- Download URL: proxmoxer-2.2.0-py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.8.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e4431fd38e1a9321eedf6d860ddc373fc2b29ce1845fa8b072d7580d99f6b90
|
|
| MD5 |
2b598f511e6eb68afc4b8294f2a71160
|
|
| BLAKE2b-256 |
2c9a0c3570e2ccce07d304c8a25f7238accc5174c234f5eddb3b666e20777898
|