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 Distribution

mvm-0.15.0.tar.gz (48.0 kB view details)

Uploaded Source

Built Distribution

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

mvm-0.15.0-py3-none-any.whl (52.6 kB view details)

Uploaded Python 3

File details

Details for the file mvm-0.15.0.tar.gz.

File metadata

  • Download URL: mvm-0.15.0.tar.gz
  • Upload date:
  • Size: 48.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mvm-0.15.0.tar.gz
Algorithm Hash digest
SHA256 69fb8364dcb2323b0fdf6735a5de355e3e594af1e26ebf802cd8d8c627ff3954
MD5 8835cc2712e1ee859f2c1cf0fa323652
BLAKE2b-256 023fcfd4cd00d1a1dca976b80a88b6b2182c0d5111e1a59efb5928673de014ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for mvm-0.15.0.tar.gz:

Publisher: publish-pypi.yml on tinylabscom/mvm

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

File details

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

File metadata

  • Download URL: mvm-0.15.0-py3-none-any.whl
  • Upload date:
  • Size: 52.6 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.15.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ffb5c24429af5e4aca692e8c20079be309e1a8ce00c62a64ce3681ddb362d56a
MD5 652493482d1891aa072e40c2fbe21da4
BLAKE2b-256 b1b06dbaa9466efa3dc0c04214efb7629a0b310aef134950de1248bad0dbae79

See more details on using hashes here.

Provenance

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

Publisher: publish-pypi.yml on tinylabscom/mvm

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