Metadata-Version: 2.4
Name: pxm-tools
Version: 0.1.3
Summary: A collection of tools to interact with Proxmox API.
Author-email: Leonardo Almeida <leonardoalmeida7777@gmail.com>
License-File: LICENSE
Requires-Python: >=3.12
Requires-Dist: python-dotenv>=1.1.0
Requires-Dist: requests>=2.32.3
Requires-Dist: rich>=14.0.0
Description-Content-Type: text/markdown

# pxm-tools

A collection of tools to interact with Proxmox API.

# Installation

```bash
pip install pxm-tools
```

# Usage

```bash
pxm-create -h
pxm-edit -h
pxm-start -h
pxm-stop -h
pxm-rm -h
```

# Must Know

Some arguments can be used from environment variables or .env file.

```bash
--api   # PM_API_URL
--user  # PM_USER
--pass  # PM_PASS
```

Options can be passed as a JSON file such as `--config config.json`

```json
{
    "node": "frodo",
    "prefix": "fl-worker",
    "pool": "federatedLearning",
    "template": 2000,
    
    "vm-cipassword": "flexfl",
    "vm-net0/rate": 50,
    "vm-net0/bridge": "vmbr1",
    "vm-localtime": 1
}
```


Configurations for the VM can be passed with the prefix `--vm-`:

```bash
--vm-cores      # Number of CPU cores
--vm-net0/rate  # Network rate limit, use / when value has other options
```

To see all available options, check the Proxmox API documentation for the VM configuration:
- https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/qemu/{vmid}/config

VM cloning is done one by one on purpose, starting, stopping, and removing VMs is done in bulk.