This commit is contained in:
@@ -0,0 +1 @@
|
||||
pip
|
||||
@@ -0,0 +1,21 @@
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2013 Oleg Butovich
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -0,0 +1,139 @@
|
||||
Metadata-Version: 2.1
|
||||
Name: proxmoxer
|
||||
Version: 2.2.0
|
||||
Summary: Python Wrapper for the Proxmox 2.x API (HTTP and SSH)
|
||||
Home-page: https://proxmoxer.github.io/docs/
|
||||
Download-URL: http://pypi.python.org/pypi/proxmoxer
|
||||
Author: Oleg Butovich
|
||||
Author-email: obutovich@gmail.com
|
||||
License: MIT
|
||||
Keywords: proxmox,api
|
||||
Classifier: Development Status :: 5 - Production/Stable
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: Intended Audience :: System Administrators
|
||||
Classifier: License :: OSI Approved :: MIT License
|
||||
Classifier: Operating System :: OS Independent
|
||||
Classifier: Programming Language :: Python :: 3.8
|
||||
Classifier: Programming Language :: Python :: 3.9
|
||||
Classifier: Programming Language :: Python :: 3.10
|
||||
Classifier: Programming Language :: Python :: 3.11
|
||||
Classifier: Programming Language :: Python :: 3.12
|
||||
Classifier: Programming Language :: Python :: 3
|
||||
Classifier: Programming Language :: Python
|
||||
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
||||
Classifier: Topic :: System :: Clustering
|
||||
Classifier: Topic :: System :: Monitoring
|
||||
Classifier: Topic :: System :: Systems Administration
|
||||
Description-Content-Type: text/x-rst
|
||||
License-File: LICENSE.txt
|
||||
|
||||
================================================
|
||||
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
|
||||
............
|
||||
|
||||
::
|
||||
|
||||
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 <https://pve.proxmox.com/pve-docs/api-viewer/index.html>`_, 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 <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
|
||||
@@ -0,0 +1,29 @@
|
||||
proxmoxer-2.2.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
|
||||
proxmoxer-2.2.0.dist-info/LICENSE.txt,sha256=FducsKC9FGCrJOa7AswLPXOGorWJLiS5YMmCC45sNxA,1073
|
||||
proxmoxer-2.2.0.dist-info/METADATA,sha256=gLlwnYShElov5M-066wt5OsPZwFmBMHLrFCNA05KplA,5165
|
||||
proxmoxer-2.2.0.dist-info/RECORD,,
|
||||
proxmoxer-2.2.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
||||
proxmoxer-2.2.0.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
||||
proxmoxer-2.2.0.dist-info/top_level.txt,sha256=ZsRL5geB-MjPcI0spxyb5QJ5X2LY81BA8F_WvWYcZ-U,10
|
||||
proxmoxer/__init__.py,sha256=x7Ja4bao0qb0G8sn2R66H7_IGEhz_L_KjuYvLXM-sVA,146
|
||||
proxmoxer/__pycache__/__init__.cpython-311.pyc,,
|
||||
proxmoxer/__pycache__/core.cpython-311.pyc,,
|
||||
proxmoxer/backends/__init__.py,sha256=aVwaNfo_mo4qWd2OTK_EbpqGpxFJuLUd-S9UClGYOmk,95
|
||||
proxmoxer/backends/__pycache__/__init__.cpython-311.pyc,,
|
||||
proxmoxer/backends/__pycache__/command_base.cpython-311.pyc,,
|
||||
proxmoxer/backends/__pycache__/https.cpython-311.pyc,,
|
||||
proxmoxer/backends/__pycache__/local.cpython-311.pyc,,
|
||||
proxmoxer/backends/__pycache__/openssh.cpython-311.pyc,,
|
||||
proxmoxer/backends/__pycache__/ssh_paramiko.cpython-311.pyc,,
|
||||
proxmoxer/backends/command_base.py,sha256=o3TBwgHoghkmG5-bno2UVK-8DwBrfc0GAq7ozkhBZAA,5339
|
||||
proxmoxer/backends/https.py,sha256=WLioH0uDCOewoJIxHrFmDHboxRDbmVuN-RgJ3inIEtI,12011
|
||||
proxmoxer/backends/local.py,sha256=RnyTrdXNwvWjxkqLbe0lgKCh0WXnKp4Jj_c4GU1-kW8,775
|
||||
proxmoxer/backends/openssh.py,sha256=9aPOT7-QrzzkavIiwnK8CiGb_txcx1125X_OTJoAjuE,1757
|
||||
proxmoxer/backends/ssh_paramiko.py,sha256=ozERATZGBB2pDTKyJUtRPHOQsXLvx924oWmVBNcCn9o,2117
|
||||
proxmoxer/core.py,sha256=-QO_Mmafndj6Cn3ltyMP1GhXTgBIuu35Ded59gDZFjk,7878
|
||||
proxmoxer/tools/__init__.py,sha256=VXnix0lFPaGzw_IckUw2_PiZMoEvJykWDyL5YDd9twk,208
|
||||
proxmoxer/tools/__pycache__/__init__.cpython-311.pyc,,
|
||||
proxmoxer/tools/__pycache__/files.cpython-311.pyc,,
|
||||
proxmoxer/tools/__pycache__/tasks.cpython-311.pyc,,
|
||||
proxmoxer/tools/files.py,sha256=SB7peNp9l7G9WFOMPepO1xKp5jNndZvxXX5hTk6FFDg,10458
|
||||
proxmoxer/tools/tasks.py,sha256=fem-EvPU0sgo_lGSUbtj71UgYHmlz1e8N3p_HJB9sEY,2717
|
||||
@@ -0,0 +1,5 @@
|
||||
Wheel-Version: 1.0
|
||||
Generator: bdist_wheel (0.44.0)
|
||||
Root-Is-Purelib: true
|
||||
Tag: py3-none-any
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
proxmoxer
|
||||
Reference in New Issue
Block a user