monty

A minimal, secure Python interpreter written in Rust for use by AI

27 articles 5.3k View on GitHub ↗
27 articles
How to Integrate Monty with Python Using PyO3: A Complete Guide

Integrate Monty with Python using PyO3 to leverage a sandboxed Rust interpreter. Explore this comprehensive guide for seamless integration and enhanced performance.

how-to-guide
Feb 19, 2026
How to Define and Register Custom External Functions in Monty: A Complete Guide

Learn how to define and register custom external functions in Monty with this complete guide. Enhance your Monty workflows by easily integrating your own Python implementations.

how-to-guide
Feb 16, 2026
Python Types Supported in Monty: A Complete Guide to the Pydantic Sandbox Runtime

Explore Python types supported in Monty. Discover primitives, containers, callables, and standard library types within Pydantic's sandbox runtime for robust data handling.

tutorial
Feb 16, 2026
How Iterative Execution Works in Monty: A Complete Guide to Sandboxed Async Python

Discover how iterative execution in Monty enables sandboxed async Python. Learn how Monty pauses at external calls and futures, serializes VM state, and resumes execution for seamless integration.

deep-dive
Feb 16, 2026
How Monty Captures stdout and stderr from Executed Python Code

Discover how Monty captures stdout and stderr from executed Python code by replacing standard stream objects and using a configurable PrintWriter for flexible output handling.

internals
Feb 16, 2026
Built-in Functions Available in Monty: Complete Guide to the Rust Python Interpreter

Explore Monty's 35 Rust compiled built-in functions like print len and sum for efficient VM dispatch. Get the complete guide to the Rust Python interpreter.

api-reference
Feb 16, 2026
How Monty Tracks Memory Allocations in Python Objects

Discover how Monty tracks memory allocations in Python using a cooperative Heap arena and pluggable ResourceTracker to record statistics and enforce limits.

internals
Feb 16, 2026
How Monty Limits Stack Depth: Function Calls and Data Structure Recursion

Discover how Monty limits stack depth using ResourceTracker for function calls and DepthGuard for container operations, preventing recursion errors.

internals
Feb 16, 2026
Python Features Not Supported in Monty: A Complete Guide to Sandbox Limitations

Explore Python features unsupported in the pydantic Monty sandbox. Understand security limitations including class definitions, pattern matching, and generators.

deep-dive
Feb 16, 2026
How to Use Monty from JavaScript/TypeScript with napi-rs

Integrate Monty the sandboxed Python interpreter into your JavaScript/TypeScript projects with napi-rs. Install the @pydantic/monty package for seamless Rust-based Python execution.

how-to-guide
Feb 16, 2026
Monty Performance Comparison to CPython: Startup Latency and Execution Speed Analysis

Discover the Monty performance comparison to CPython. Analyze microsecond cold-start latency and execution speeds 0.5x to 5x faster than CPython for high-frequency Python execution.

performance
Feb 16, 2026
How Monty's Built-in Type Checking Works: A Deep Dive into the Rust Implementation

Explore Monty's type checking implementation. Learn how it uses Ruff's ty crates and a Salsa database for efficient Python code analysis across interfaces.

deep-dive
Feb 16, 2026

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →