$npx skillfedfor your agent

pydantic-monty

The Monty sandboxed Python interpreter: bindings plus the worker binary

With conditionsPyPI Python ModulesReleased Aug 20263.4M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pydantic_monty-0.0.21-py3-none-any.whl
v0.0.21 · released 2026-08-09 · Python >=3.10 · 2 runtime deps: pydantic-monty-client, pydantic-monty-runtime

Yes, if you need to execute untrusted Python code safely. The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and low install friction. It is still in Alpha (Development Status 3), so expect API changes and test thoroughly before production use. Not necessary if you only run trusted code.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later; the monty worker binary must be available via MONTY_BIN, binary_path, PATH, or installed via pydantic-monty-runtime.
  • Low install friction: a pure-Python wheel metapackage that bundles two distributions (pydantic-monty-client and pydantic-monty-runtime).
  • Actively maintained with a release 5 days old and 8052 repository stars.

License · maintenance · safety

MIT (permissive) — MIT license permits commercial use, modification, and distribution with minimal restrictions—standard permissive terms.

last release 2026-08-09 (5 days) · last repo commit 2026-08-14 · 8,052 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,394,230 downloads/mo, #2,638 on PyPI

Verify before relying

from pydantic_monty import Monty

with Monty() as pool:
    with pool.checkout() as session:
        result = session.feed_run('1 + 2')
        print(result)  # 3
  • Whether the worker binary is pre-compiled for all supported platforms (macOS, Windows, Linux) or requires build-time setup.
  • Performance overhead of subprocess spawning and IPC for typical workloads.
  • Exact semantics of crash recovery and whether all memory errors trigger MontyCrashedError.
Same gist for agents: .md · .json

What it is and what it does

Pydantic-monty is a Python sandbox that executes untrusted or adversarial code in isolated worker subprocesses, preventing crashes from corrupting your main process. It wraps the Monty interpreter—a hardened Python runtime—and exposes it via a pool-based API: you check out a session, feed it code snippets, and get results back. State persists across feeds within a session, and the pool transparently replaces any crashed worker.

The package is a metapackage that installs two distributions: pydantic-monty-client (the importable module) and pydantic-monty-runtime (the worker binary). It supports both synchronous and async workflows, with features like snapshots (pausing/resuming execution), resource limits (timeout, cumulative execution time), type checking via bundled ty, and filesystem mounts. External functions can be injected via external_lookup, and execution state can be serialized and restored across processes.

Use it for

  • Execute untrusted user-submitted code (e.g., in a code-evaluation service) without risking the host process.
  • Run adversarial or fuzzing inputs against your code in isolation to detect crashes or resource exhaustion.
  • Implement a REPL or notebook-like interface where each cell runs in a fresh or persistent sandbox session.
  • Checkpoint long-running computations by dumping and restoring execution snapshots across process boundaries.
  • Enforce strict resource limits (CPU time, memory) on code execution with transparent worker replacement on timeout.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need to execute untrusted Python code safely.

The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and low install friction. It is still in Alpha (Development Status 3), so expect API changes and test thoroughly before production use. Not necessary if you only run trusted code.

Install

pydantic-monty on PyPI

Before you install

Low install friction: a pure-Python wheel metapackage that bundles two distributions (pydantic-monty-client and pydantic-monty-runtime). Actively maintained with a release 5 days old and 8052 repository stars.

Requires Python 3.10 or later; the monty worker binary must be available via MONTY_BIN, binary_path, PATH, or installed via pydantic-monty-runtime.

License in practice

MIT license permits commercial use, modification, and distribution with minimal restrictions—standard permissive terms.

Quickstart

from pydantic_monty import Monty

with Monty() as pool:
    with pool.checkout() as session:
        result = session.feed_run('1 + 2')
        print(result)  # 3

Verify before relying

  • Whether the worker binary is pre-compiled for all supported platforms (macOS, Windows, Linux) or requires build-time setup.
  • Performance overhead of subprocess spawning and IPC for typical workloads.
  • Exact semantics of crash recovery and whether all memory errors trigger MontyCrashedError.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
pydantic-monty-clientpydantic-monty-runtime
MaintenanceActively maintained 5 days since the last release
Last repo commit
First released
Downloads3,394,230 / month, #2,638 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 3 - AlphaEnvironment :: MacOS XIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: ImplementationTopic :: InternetTopic :: Software Development :: Libraries :: Python Modules

Evidence: pydantic_monty-0.0.21-py3-none-any.whl

Tags

Capabilities
sandboxed python executionuntrusted code isolationsubprocess worker poolsafe code evaluationpython sandbox interpretercrash-proof code runnerresource-limited execution
Topics
sandboxingsecurity-isolationasync-support

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 › “subprocess worker pool”

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also pydantic-monty-runtime · starlark-pyo3 · pydantic-evals · pydantic-ai-harness · monty · pytest-forked · e2b · hyperlight-sandbox · bounded-pool-executor · hyperlight-sandbox-backend-wasm