python wrapper for Proxmox API v2 (https://pve.proxmox.com/pve-docs/api-viewer/index.html)
  • Python 99.2%
  • Dockerfile 0.5%
  • Shell 0.3%
Find a file
2026-03-04 02:11:54 +00:00
.devcontainer Update testing to python 3.10 - 3.13 (#214) 2025-12-20 11:58:00 -05:00
.github/workflows Update 2FA Mechanism (#158) 2025-12-20 14:38:14 -05:00
.vscode Small meta/project changes 2024-12-13 21:45:12 +00:00
proxmoxer Bump version to 2.3.0 and add release to changelog 2026-02-07 04:38:10 +00:00
tests Only decode response as JSON if call was successful (#204) 2025-12-20 17:23:35 -05:00
.bandit Add HTTPS Backend tests and a few Auth tests 2022-07-06 04:58:55 +00:00
.git-blame-ignore-revs Add git blame ignore file for formatting commit 2022-01-01 02:53:48 +00:00
.gitignore Generalize Services and Limit to Supported Configurations (#43) 2021-10-07 18:27:26 -04:00
.pre-commit-config.yaml Update testing to python 3.10 - 3.13 (#214) 2025-12-20 11:58:00 -05:00
CHANGELOG.md Bump version to 2.3.0 and add release to changelog 2026-02-07 04:38:10 +00:00
dev_requirements.txt Add pre-commit hooks for formatting and linting 2021-06-01 03:29:42 +00:00
LICENSE.txt minor fixes 2017-12-02 15:54:18 +01:00
MANIFEST.in Add information for version 1.3.0 2022-03-13 20:15:21 +00:00
pyproject.toml Add config for formatter and linter 2021-06-01 03:29:42 +00:00
README.rst Update Readme with updated example 2023-01-23 16:25:14 -07:00
setup.cfg Add start of mocked API and tests 2022-07-07 18:38:42 +00:00
setup.py Mark supported Python as 3.10-3.14 2026-02-07 04:38:10 +00:00
test_requirements.txt Update testing to python 3.10 - 3.13 (#214) 2025-12-20 11:58:00 -05:00

================================================
Proxmoxer: A Python wrapper for Proxmox REST API
================================================

master branch:  |master_build_status| |master_coverage_status| |pypi_version| |pypi_downloads|

develop branch: |develop_build_status| |develop_coverage_status|


Proxmoxer is a python wrapper around the `Proxmox REST API v2 <https://pve.proxmox.com/pve-docs/api-viewer/index.html>`_.
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 <https://github.com/baseblack/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 <https://proxmoxer.github.io/docs/latest/v1_migration/>`_.

Installation
............

.. code-block:: bash

    pip install proxmoxer

To use the 'https' backend, install requests

.. code-block:: bash

    pip install requests

To use the 'ssh_paramiko' backend, install paramiko

.. code-block:: bash

    pip install paramiko

To use the 'openssh' backend, install openssh_wrapper

.. code-block:: bash

    pip install openssh_wrapper


Short usage information
.......................

The first thing to do is import the proxmoxer library and create ProxmoxAPI instance.

.. code-block:: python

    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 <https://pve.proxmox.com/pve-docs/api-viewer/index.html>`_, you can create
API calls using the access methods above.

.. code-block:: pycon

    >>> 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 <https://github.com/proxmoxer/proxmoxer/blob/develop/CHANGELOG.md>`_
...................................................................................................

.. |master_build_status| image:: https://github.com/proxmoxer/proxmoxer/actions/workflows/ci.yaml/badge.svg?branch=master
    :target: https://github.com/proxmoxer/proxmoxer/actions

.. |master_coverage_status| image:: https://img.shields.io/coveralls/github/proxmoxer/proxmoxer/master
    :target: https://coveralls.io/github/proxmoxer/proxmoxer?branch=master

.. |develop_build_status| image:: https://github.com/proxmoxer/proxmoxer/actions/workflows/ci.yaml/badge.svg?branch=develop
    :target: https://github.com/proxmoxer/proxmoxer/actions

.. |develop_coverage_status| image:: https://img.shields.io/coveralls/github/proxmoxer/proxmoxer/develop
    :target: https://coveralls.io/github/proxmoxer/proxmoxer?branch=develop

.. |pypi_version| image:: https://img.shields.io/pypi/v/proxmoxer.svg
    :target: https://pypi.python.org/pypi/proxmoxer

.. |pypi_downloads| image:: https://img.shields.io/pypi/dm/proxmoxer.svg
    :target: https://pypi.python.org/pypi/proxmoxer