Skip to main content

Declarative microVM workloads for Python — author once, emit a Nix flake, boot under mvm.

Project description

mvm — Python SDK

Declarative microVM workloads for Python. Decorate a function or describe a workload, and the mvmforge host CLI emits a Nix flake plus a launch plan that mvm can boot.

pip install mvm

The host CLI (mvmforge, written in Rust) is distributed separately. The Python SDK ships only the authoring + runtime surfaces that the host subprocesses to.

Quick start

# app.py
import mvm as mv

@mv.func(
    name="adder",
    image=mv.nix_packages(["python312"]),
    resources=mv.resources(cpu_cores=1, memory_mb=256, rootfs_size_mb=512),
)
def add(a: int, b: int) -> int:
    return a + b
mvmforge emit app.py        # canonical IR
mvmforge compile app.py     # flake.nix + launch.json
mvmforge up app.py          # boot under mvm (dev only)

Three surfaces

Surface Purpose
Authoring @mv.app, @mv.func, mv.workload(...), factories for image / network / resources / deps.
Runtime f.remote(...) and mv.session(...) — host-side calls into a function-entrypoint VM. Dev-only by design.
Sandbox mv.Sandbox, Process, FileEntry — typed lifecycle handles over local mvm sandbox primitives. Dev-only.

The runtime SDK exists to assist build-time emission and dev-time introspection. Production microVMs are observed via mvmctl logs and output streams; no host-side .remote() calls.

Optional extras

pip install 'mvm[schema]'   # pydantic-based schema auto-derivation

Documentation

Full documentation: https://mvmforge-docs.pages.dev/sdks/python/

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mvm-0.1.1-py3-none-any.whl (36.0 kB view details)

Uploaded Python 3

File details

Details for the file mvm-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mvm-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 36.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mvm-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9d88b2c1740eac5bae37f6d9cc63c4d5e1b43c5e9a3b2d39cf11d666ee676c44
MD5 fc136bae4eda0187d8f706bbfb5c612c
BLAKE2b-256 93765c13b26e8122bb732deb1e050e37dda4cdad92db259e7eee677e8e96e65e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mvm-0.1.1-py3-none-any.whl:

Publisher: publish-python.yml on tinylabscom/mvmforge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page