minimega Python bindings
minimega is the Python client package for controlling a running minimega
instance over its UNIX domain socket. The bindings are autogenerated from
minimega's command definitions and expose command docstrings directly in Python.
These bindings do not start minimega for you. You must already have a running minimega instance and permission to access its command socket.
Requirements
-
Python 3.10 or newer
-
A running minimega instance
-
Access to the minimega command socket, which defaults to:
/tmp/minimega/minimega
By default, that socket is often only readable/writable by root.
Install
pip install minimega
Quick start
import minimega
with minimega.connect() as mm:
for resp in mm.version():
print(resp["Response"])
To print tabular command output:
import minimega
with minimega.connect() as mm:
minimega.print_rows(mm.vm_info())
To scope commands to a namespace:
import minimega
with minimega.connect() as mm:
with mm.namespace("lab") as ns:
ns.vm_info()
Response model
Use close() or a with minimega.connect() as mm: block to close the UNIX
socket when the client is no longer needed.
One connection is serial: all responses from one command must be consumed
before another command is issued on the same connection. If a command produces
additional responses, consume them with streamResponses() or discard them with
minimega.discard(...).
Create one connection per process. Do not pickle a connected client or share it
across multiprocessing workers.
Use cc_filtered(...) to scope command-and-control filters and automatically
clear the filter on exit:
with minimega.connect() as mm:
with mm.cc_filtered("uuid=abc"):
mm.cc_exec_once("pkill iperf3")
More information
- Main documentation: https://sandia-minimega.github.io/minimega/
- Python bindings article: https://sandia-minimega.github.io/minimega/articles/python/
- Generated Python API reference: https://sandia-minimega.github.io/minimega/reference/python/
- Command API usage details: https://sandia-minimega.github.io/minimega/articles/usage/#command-port-and-the-local-command-flag
- Issue tracker: https://github.com/sandia-minimega/minimega/issues
Metadata
Release files for minimega 3.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| minimega-3.4.0.tar.gz | 60.1 kB | With provenance | Details for minimega-3.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| minimega-3.4.0-py3-none-any.whl | Python 3 | none | any | Details for minimega-3.4.0-py3-none-any.whl |
Total release size: 120.9 kB
Release files / minimega-3.4.0.tar.gz
| Download URL | minimega-3.4.0.tar.gz |
|---|---|
| Size | 60.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
97728fe37ef98c37d796b14d6c0e154d897c622decde0e8febf31fc5ae1cbfbc
|
|
BLAKE2b-256 checksum How to use checksums |
6b002cd2a6bfd54e98d939fb9b4df95e1f05236943707a15e2fe9c399bbeac0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logRelease files / minimega-3.4.0-py3-none-any.whl
| Download URL | minimega-3.4.0-py3-none-any.whl |
|---|---|
| Size | 60.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
000ca77a3f8918c76d45e79593411945fe17ba9e8e4338a699c121083406964d
|
|
BLAKE2b-256 checksum How to use checksums |
dc787a9db5d82b6838217ee213b1b543cef319f41e0b04d2d3e653d3d3301162
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logSecurity for minimega 3.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for minimega-3.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.