--- id: qemu-qmp version: "0.0.6" license: unclear license_treatment: copyleft maintenance: active --- # qemu.qmp — QEMU Monitor Protocol library License: copyleft · Maintenance: active · Downloads: 455.2K/mo ## What it is and what it does qemu.qmp is a low-level Python asyncio library that implements the QEMU Monitor Protocol, allowing you to send commands and receive responses from running QEMU emulators and related tools. It does not define or validate commands—you specify exactly what QMP messages to send—making it a protocol transport rather than a high-level SDK. It is designed for QEMU developers, integrators building QEMU into larger systems (like KubeVirt or Kata Containers), and power users who need direct programmatic control over QEMU without the abstraction layers of libvirt or virt-manager. The library uses Python's asyncio for non-blocking I/O and has no mandatory external dependencies, making it lightweight and easy to embed. It is currently in alpha (0.0.z), meaning the API may change between micro releases; the maintainers plan a 0.1.z beta release once the API stabilizes. It supports modern Python versions (3.8–3.14) and is actively maintained by the QEMU project itself. Use it for: - Scripting QEMU emulator control in test infrastructure or CI/CD pipelines without external VM management tools. - Building custom VM orchestration or monitoring tools that need direct QMP access for specific use cases. - Integrating QEMU control into larger applications like container runtimes or hypervisor management platforms. - Querying and manipulating QEMU Guest Agent or Storage Daemon endpoints programmatically. - Automating complex QEMU workflows (snapshots, migrations, device hotplug) in development or testing environments. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A Python asyncio library for sending QMP (QEMU Monitor Protocol) messages to running QEMU emulators, Guest Agents, Storage Daemons, or other QMP-speaking endpoints. Yes, if you need programmatic control over QEMU and accept the alpha API stability risk. The library is actively maintained, has no dependencies, installs easily, and is backed by the QEMU project itself. Not suitable if you want a stable, high-level VM management API—use libvirt or virt-manager instead. No known security vulnerabilities. ## Install pip install qemu-qmp uv add qemu-qmp poetry add qemu-qmp ## Installing qemu.qmp Before you install: Low friction: pure Python wheel with no runtime dependencies. Actively maintained (last release 136 days ago), supports Python 3.8 through 3.14, and marked as alpha (0.0.z versions may have breaking API changes). License in practice: Dual-licensed under GPLv2 and LGPLv2+. Copyleft terms apply; derivative works and distributions must comply with GPL/LGPL obligations. Quickstart: pip install qemu.qmp import asyncio from qemu.qmp import QMPClient async def main(): qmp = QMPClient('my-vm') await qmp.connect('qmp.sock') res = await qmp.execute('query-status') print(f"VM status: {res['status']}") await qmp.disconnect() asyncio.run(main()) Requires Python 3.8+; QEMU instance must be running with QMP monitor enabled (e.g., -qmp unix:qmp.sock,server=on,wait=off). Verify before relying: - Whether the library handles reconnection, timeouts, or connection pooling automatically. - Performance characteristics under high-frequency command execution or event streaming. - Compatibility with specific QEMU versions or QMP protocol versions beyond the general statement. ## Package facts - License: not declared (copyleft) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 455.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags qemu monitor protocol client, qmp library python, qemu asyncio communication, qemu control scripting, qemu emulator remote control, qmp protocol implementation, qemu guest agent interface, qemu-integration, asyncio, protocol-client [View on SkillFed](https://skillfed.io/packages/qemu-qmp) · [View on PyPI](https://pypi.org/project/qemu-qmp/)