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.0-py3-none-any.whl (36.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mvm-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 53d07b4ac6b02f44632d533a1cd727ec0b627a5527df187c2cab9f5d20c5d50f
MD5 a428fc6c44c2d48f69c543f454fa1623
BLAKE2b-256 3c126a74dfeb54aa80059a3c498ce8fc98bc65911b611d868266545b96855ee2

See more details on using hashes here.

Provenance

The following attestation bundles were made for mvm-0.1.0-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