{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/5"},{"label":"Internet","url":"https://skillfed.io/packages/category/internet/2"}],"enrichment":{"capability":"Provides Python bindings to execute untrusted Python code in a sandboxed subprocess pool, with crash isolation and resource limits enforced by the Monty interpreter.","skillfed_tags":["sandboxing","security-isolation","async-support"],"use_cases":["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."],"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\u2014a hardened Python runtime\u2014and 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.\n\nThe 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.","worth_installing":"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."},"id":"pydantic-monty","links":{"html":"https://skillfed.io/packages/pydantic-monty","md":"https://skillfed.io/packages/pydantic-monty.md","pypi":"https://pypi.org/project/pydantic-monty/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-08-09","license_spdx":"MIT","license_treatment":"permissive","name":"pydantic-monty","python_support":"supports_current","summary":"The Monty sandboxed Python interpreter: bindings plus the worker binary"},"popularity":{"monthly_downloads":3394230,"position":2638,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.0.21"}
