pydantic-monty-runtime
The monty CLI binary — spawned as worker subprocesses by pydantic-monty
Decision gist · record as of 2026-08-14
Yes, if you need sandboxed Python execution with resource limits and crash isolation. Install directly only if you are building on top of pydantic-monty or monty-pool; otherwise, install pydantic-monty (which pulls it in automatically). No known vulnerabilities, active maintenance, and permissive MIT license. Medium install friction is offset by precompiled wheels across platforms.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >= 3.10.
- The binary is precompiled; installation places it in the environment's scripts directory and assumes a compatible platform (macOS, Linux, or Windows).
- Medium install friction due to precompiled wheels across multiple platforms and Python versions (3.10+).
License · maintenance · safety
MIT (permissive) — MIT license permits permissive use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
last release 2026-08-09 (5 days) · last repo commit 2026-08-14 · 8,053 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 328,029 downloads/mo, #7,560 on PyPI
Alternatives
Verify before relying
pip install pydantic-monty-runtime
# Then use the monty binary from the command line:
# monty -c "print('hello world')"
# monty file.py
# monty --max-memory 10MB --max-duration 0.5 -c "code"- Whether the package works correctly when installed directly vs. only as a transitive dependency of pydantic-monty
- Performance characteristics and overhead of the sandbox relative to standard Python execution
- Completeness of stdlib subset implemented by the Monty interpreter
What it is and what it does
pydantic-monty-runtime is a compiled binary package that installs the `monty` command-line tool—a sandboxed Python interpreter written in Rust. It can run Python code in three modes: interactive REPL, file execution, or as a subprocess worker driven by a parent process. The sandbox enforces resource limits (memory, execution duration, recursion depth, garbage collection intervals) and provides crash isolation via the monty-alloc allocator, which raises MemoryError on soft-limit crossing and exits with a dedicated status on hard-limit crossing.
The package is primarily designed as a runtime dependency for pydantic-monty and pydantic-monty-client, which use it to execute untrusted or resource-constrained Python code safely. It supports optional type checking via ty, filesystem mounts with configurable access modes, and optional telemetry via Logfire (behind a feature flag). The binary is packaged for PyPI using the same model as uv and ruff, placing the compiled executable in the environment's scripts directory.
Use it for
- Run untrusted Python code in a controlled sandbox with enforced memory and time limits
- Execute Python scripts as isolated worker subprocesses with crash recovery
- Type-check Python code before execution using the -t flag
- Mount host directories into the sandbox for controlled file access with ro/rw/overlay modes
- Integrate sandboxed Python execution into larger systems via pydantic-monty or monty-pool
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need sandboxed Python execution with resource limits and crash isolation.
Install directly only if you are building on top of pydantic-monty or monty-pool; otherwise, install pydantic-monty (which pulls it in automatically). No known vulnerabilities, active maintenance, and permissive MIT license. Medium install friction is offset by precompiled wheels across platforms.
Install
pydantic-monty-runtime on PyPI
Before you install
Medium install friction due to precompiled wheels across multiple platforms and Python versions (3.10+). Actively maintained with recent releases; intended as a dependency pulled in by pydantic-monty rather than direct installation.
Requires Python >= 3.10. The binary is precompiled; installation places it in the environment's scripts directory and assumes a compatible platform (macOS, Linux, or Windows).
License in practice
MIT license permits permissive use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install pydantic-monty-runtime
# Then use the monty binary from the command line:
# monty -c "print('hello world')"
# monty file.py
# monty --max-memory 10MB --max-duration 0.5 -c "code"
Verify before relying
- Whether the package works correctly when installed directly vs. only as a transitive dependency of pydantic-monty
- Performance characteristics and overhead of the sandbox relative to standard Python execution
- Completeness of stdlib subset implemented by the Monty interpreter
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 5 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 328,029 / month, #7,560 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 3 - AlphaEnvironment :: MacOS XIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxOperating System :: UnixProgramming Language :: Rust |
Evidence: pydantic_monty_runtime-0.0.21-cp310-cp310-macosx_10_12_x86_64.whl; pydantic_monty_runtime-0.0.21-cp310-cp310-macosx_11_0_arm64.whl; pydantic_monty_runtime-0.0.21-cp310-cp310-manylinux_2_28_aarch64.whl; pydantic_monty_runtime-0.0.21-cp310-cp310-manylinux_2_28_armv7l.whl; pydantic_monty_runtime-0.0.21-cp310-cp310-manylinux_2_28_i686.whl; pydantic_monty_runtime-0.0.21-cp310-cp310-manylinux_2_28_ppc64le.whl; pydantic_monty_runtime-0.0.21-cp310-cp310-manylinux_2_28_s390x.whl; pydantic_monty_runtime-0.0.21-cp310-cp310-manylinux_2_28_x86_64.whl; pydantic_monty_runtime-0.0.21-cp310-cp310-musllinux_1_1_aarch64.whl; pydantic_monty_runtime-0.0.21-cp310-cp310-musllinux_1_1_x86_64.whl; pydantic_monty_runtime-0.0.21-cp310-cp310-win32.whl; pydantic_monty_runtime-0.0.21-cp310-cp310-win_amd64.whl; pydantic_monty_runtime-0.0.21-cp311-cp311-macosx_10_12_x86_64.whl; pydantic_monty_runtime-0.0.21-cp311-cp311-macosx_11_0_arm64.whl; pydantic_monty_runtime-0.0.21-cp311-cp311-manylinux_2_28_aarch64.whl; pydantic_monty_runtime-0.0.21-cp311-cp311-manylinux_2_28_armv7l.whl; pydantic_monty_runtime-0.0.21-cp311-cp311-manylinux_2_28_i686.whl; pydantic_monty_runtime-0.0.21-cp311-cp311-manylinux_2_28_ppc64le.whl; pydantic_monty_runtime-0.0.21-cp311-cp311-manylinux_2_28_s390x.whl; pydantic_monty_runtime-0.0.21-cp311-cp311-manylinux_2_28_x86_64.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 › “monty cli binary”
- pydantic-monty-runtimeProvides the `monty` command-line binary, a sandboxed Python…
- montyMonty provides supplementary utility functions and design patterns…
- pydantic-montyProvides Python bindings to execute untrusted Python code in a…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also pydantic-monty · bashkit · hyperlight-sandbox-python-guest · monty · starlark-pyo3 · RestrictedPython · nono-py · e2b · hyperlight-sandbox · pydantic-deep