pydevtools.com blog
Pydantic Monty: A Secure Python Interpreter for AI Agents
Pydantic has released Monty, a minimal Python interpreter written in Rust for safely executing LLM-generated code. AI agents that generate code face a tradeoff: trust the generated code completely, or spin up containers for isolation. Containers are slow and resource-intensive. Trusting arbitrary code is risky. Monty sidesteps both by sandboxing execution at the interpreter level, blocking dangerous operations while running Python in microseconds. How It Works Monty provides a straightforward API:
February 6, 2026
FOSDEM Talk: Modern Python Monorepo with uv, Workspaces, and prek
Jarek Potiuk, Apache Airflow PMC member and the project’s top committer, gave a talk at FOSDEM 2026 on how Airflow manages its massive Python monorepo. The recording is now available. Airflow ships over 120 separate Python distributions from a single repository, with 700+ dependencies and 3,600+ contributors. That scale forced the team to modernize their tooling. The talk walks through how they did it. uv Workspaces for Monorepo Management The new setup centers on uv workspaces. Rather than splitting 120 distributions across separate repositories or bundling everything into an unmanageable monolith, Airflow uses uv’s workspace feature to let distributions depend on each other via local sources instead of pulling from PyPI.
February 5, 2026
uvx.sh: Install Python tools without uv or Python
Astral has released uvx.sh, a service that generates installation scripts for any Python tool on PyPI. With a single curl or PowerShell command, users can install tools like ruff or pytest without having uv or Python already installed on their system. How It Works uvx.sh dynamically generates installation scripts for any PyPI package. The URL pattern is simple: uvx.sh/{package}/install.sh # macOS/Linux uvx.sh/{package}/install.ps1 # Windows For example, to install ruff:
January 22, 2026
Teaching Claude Code Quality Patterns with a Custom Skill
Dagster’s dignified-python-313 skill guides Claude Code to write Python 3.13 code that matches their project conventions. What It Covers Modern Python 3.13 Patterns: Use native type syntax (list[str], str | None) instead of older alternatives. Skip from __future__ import annotations since Python 3.13 doesn’t need it. CLI Development: Build Click interfaces with proper error handling. Use click.echo() for output, direct errors to stderr, and treat CLI commands as error boundaries that catch exceptions and exit with SystemExit(1).
January 9, 2026
ty is Built with AI
Tool creators are building their tools with AI coding assistants. Boris Cherny, creator of Claude Code, didn’t open an IDE in December but wrote 200 PRs with Claude Code. Charlie Marsh, creator of ruff, uv, and ty, noted that all his PRs to ty were created with Claude Code. The tools building themselves. Integration with Python Tooling The handbook’s Modern Python Project Setup Guide for AI Assistants provides structured guidance so AI tools default to uv and modern patterns rather than falling back to pip commands.
January 2, 2026
How uv Achieved Its Performance
Andrew Nesbitt’s “How uv got so fast” explains that uv’s speed comes less from Rust and more from eliminating work entirely. Speed Through Elimination Rather than optimizing slow code paths, uv just removes them: No .egg support No pip.conf No bytecode compilation by default Ignoring requires-python upper bounds reduces resolver backtracking Rust-Independent Optimizations Many of uv’s performance gains could work in pip: Parallel downloads instead of sequential Smart HTTP range requests for metadata uv got fast by launching when PEP 658 infrastructure was ready and by skipping backward compatibility requirements that slow down pip.
December 26, 2025
ty: Astral's New Python Type Checker Released
Astral released ty, a Python type checker written in Rust, today. The company behind uv and Ruff designed ty as an alternative to mypy and Pyright, with performance as a primary focus. Speed Benchmarks According to Astral’s benchmarks: ty checks the home-assistant project in 2.19 seconds (20x faster than mypy’s 45.66 seconds) After editing a file in PyTorch, ty recomputes diagnostics in 4.7ms (80x faster than Pyright’s 386ms) Key Features ty includes several design choices that distinguish it from existing type checkers:
December 16, 2025
Teaching LLMs Python Best Practices
Large language models possess extensive Python knowledge from training data, yet they consistently struggle with modern tooling practices. Despite being trained on massive amounts of Python code, frontier models often default to outdated patterns like direct python or pip commands instead of using virtual environments and modern tools like uv. how is it, that despite every frontier LLM being insanely python maxxed they rarely use virtural envs, and even adding rules like "we are using uv, do everything with uv" they ignore it and think the system python is broken. like, every time. that's actually an accomplishment
November 21, 2025
Claude Code Hooks for uv Projects
Claude Code supports custom hooks that guide the AI agent toward project-specific workflows. For Python projects using uv, hooks can prevent Claude from falling back to pip and python commands. Note This post builds on the interceptor approach for teaching AI agents about uv. Interceptors provide runtime feedback; hooks prevent problematic commands before execution.
November 11, 2025
Sync with uv: Eliminate Pre-commit Version Drift
Managing tool versions across multiple configuration files creates persistent headaches in Python development. When you upgrade ruff in your pyproject.toml, you must remember to manually update the pre-commit hook version in .pre-commit-config.yaml. This version drift causes inconsistent behavior between local development and pre-commit checks. The sync-with-uv library solves this by automatically synchronizing tool versions between uv.lock and .pre-commit-config.yaml. The Problem Consider this common scenario: # pyproject.toml [dependency-groups] lint = ["ruff>=0.1.0", "mypy>=1.0.0"] # .pre-commit-config.yaml repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.1.5 # Must manually sync with pyproject.toml hooks: - id: ruff When uv lock --upgrade updates ruff to 0.1.8, the pre-commit hook stays pinned to 0.1.5. This creates confusing behavior where local checks differ from pre-commit results.
September 26, 2025