{"id":50822420,"url":"https://github.com/client-api/pmg-python","last_synced_at":"2026-06-13T15:03:18.536Z","repository":{"id":359809960,"uuid":"1247559787","full_name":"client-api/pmg-python","owner":"client-api","description":null,"archived":false,"fork":false,"pushed_at":"2026-05-23T14:58:53.000Z","size":308,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-23T16:23:04.200Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/client-api.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-23T13:31:51.000Z","updated_at":"2026-05-23T14:58:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/client-api/pmg-python","commit_stats":null,"previous_names":["client-api/pmg-python"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/client-api/pmg-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/client-api","download_url":"https://codeload.github.com/client-api/pmg-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/client-api%2Fpmg-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34288666,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-13T15:03:17.808Z","updated_at":"2026-06-13T15:03:18.528Z","avatar_url":"https://github.com/client-api.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clientapi_pmg\n\nPython SDK for the Proxmox Mail Gateway API. Generated\nfrom the upstream `apidoc.js` from Proxmox Mail Gateway via [openapi-generator-cli][gen] with\ncustom Mustache template overrides.\n\n\u003e **Not an official Proxmox project.** Community SDK derived from the\n\u003e upstream `apidoc.js`. Always verify against the upstream API viewer.\n\u003e \u003chttps://pmg.proxmox.com/\u003e.\n\nRequires Python ≥ 3.9.\n\n## Install\n\n```bash\npip install clientapi-pmg\n```\n\nOr for development:\n\n```bash\npip install -r requirements.txt\n```\n\n## Usage\n\n```python\nfrom clientapi_pmg import Configuration, Pve\n\ncfg = Configuration(\n    host='https://pmg1.example.com:8006/api2/json',\n    api_key={'Authorization': 'PMGAPIToken=user@realm!tokenid=uuid-secret'},\n)\npmg = Pmg(configuration=cfg)\n\n# Per-tag properties are lazily instantiated and share the same ApiClient.\n# `removeOperationIdPrefix=true` strips the tag prefix from method names,\n# so the call is `pmg.qemu.vm_status(...)`, not `pmg.qemu.qemu_vm_status(...)` —\n# you're already inside the `qemu` namespace.\nstatus = pmg.qemu.vm_status(node='pmg1', vmid=100)\nnodes = pmg.nodes.get_nodes()\n```\n\n### Discovering available methods\n\nEach per-tag API class lives at `clientapi_pmg.api.\u003ctag\u003e_api.\u003cTag\u003eApi`.\nList its methods to see what's callable:\n\n```python\nprint([m for m in dir(pmg.qemu) if not m.startswith('_')])\n```\n\nGenerated method-level docstrings explain parameters; the upstream\nendpoint reference is the upstream API viewer.\n\nThe unified `Pmg` class wraps each per-tag API class (`QemuApi`,\n`LxcApi`, `ClusterApi`, `NodesApi`, …) so consumers don't need to\ninstantiate them individually.\n\n## Compound configs\n\nPVE encodes many fields as CLI-style shorthand strings\n(`net0=virtio,bridge=vmbr0,firewall=1`). Round-trip helpers are\nemitted for every compound config schema:\n\n```python\nfrom clientapi_pmg.models import PveQemuNetConfig\n\ncfg = PveQemuNetConfig(model='virtio', bridge='vmbr0', firewall=1)\nshorthand = cfg.to_shorthand()  # → 'virtio,bridge=vmbr0,firewall=1'\n\nparsed = PveQemuNetConfig.from_shorthand(shorthand)\n```\n\n## Indexed families\n\nNumbered properties (`net0..net31`, `mp0..mp255`, …) are exposed on\nevery model as a single collapsed `nets` / `mps` / … field:\n\n```python\nreq = QemuCreateVmRequest(\n    nets={\n        0: 'virtio,bridge=vmbr0',\n        3: 'e1000,bridge=vmbr1',\n    },\n)\n# Wire format: { 'net0': 'virtio,bridge=vmbr0', 'net3': 'e1000,bridge=vmbr1' }\n```\n\n## License\n\nApache 2.0 — see [LICENSE](./LICENSE).\n\n[gen]: https://openapi-generator.tech\n[upstream-docs]: https://pmg.proxmox.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclient-api%2Fpmg-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclient-api%2Fpmg-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclient-api%2Fpmg-python/lists"}