qemu.qmp
QEMU Monitor Protocol library
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8+; QEMU instance must be running with QMP monitor enabled (e.g., -qmp unix:qmp.sock,server=on,wait=off).
- 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 · maintenance · safety
copyleft license (copyleft) — Dual-licensed under GPLv2 and LGPLv2+. Copyleft terms apply; derivative works and distributions must comply with GPL/LGPL obligations.
last release 2026-03-31 (136 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 455,226 downloads/mo, #6,561 on PyPI
Alternatives
Verify before relying
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())- 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.
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 on this page. Verify before relying on it.
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
qemu-qmp on PyPI
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).
Requires Python 3.8+; QEMU instance must be running with QMP monitor enabled (e.g., -qmp unix:qmp.sock,server=on,wait=off).
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())
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 | copyleft license copyleft |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 136 days since the last release |
| First released | |
| Downloads | 455,226 / month, #6,561 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License v2 (GPLv2)License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)Natural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: System :: EmulatorsTyping :: Typed |
Evidence: qemu_qmp-0.0.6-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “qemu monitor protocol client”
- qemu.qmpA Python asyncio library for sending QMP (QEMU Monitor Protocol)…
- libvirt-pythonProvides Python bindings to the libvirt virtualization API, allowing…
- pytest-embedded-qemuA pytest plugin that runs embedded system tests on QEMU instead of…
Give your agent the search over MCP, or paste the wish link into any chat.
More System packages
Provides a platform-independent file locking mechanism to coordinate access to files across processes and threads.
Distro provides a reliable, machine-readable API to query the Linux or BSD distribution name, version, codename, and other OS platform details, replacing Python's deprecated `platform.linux_distribution` function.
Install it if you need to detect or report the Linux/BSD distribution your code runs on.
psutil retrieves real-time information about running processes and system resources (CPU, memory, disks, network, sensors) across multiple operating systems, enabling system monitoring, process profiling, and resource management.
Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.
Provides asynchronous file I/O operations for asyncio programs, with automatic selection of the best available backend (io_uring, libaio, thread-based, or pure Python) depending on your system.
Portalocker provides cross-platform file locking with support for exclusive and shared locks, plus Redis-based distributed locks and process-aware PID file locking.
Install it if you need file or process coordination; the optional extras (pywin32, redis) are only required for specific lock types.
See also aiormq · pytest-embedded-qemu · libvirt-python · unicorn · p1monitor · aio-pika · aiomonitor · kcli · bincopy · pytest-cpp