Loading...
Loading...
Develop Python applications using modern patterns, uv, functional-first design, and production-first practices. Use this whenever working with .py files, pyproject.toml, uv commands, pip/pip3, poetry, virtualenv/venv, inline script metadata, or Python tooling like pytest, mypy, ruff, asyncio, itertools, functools, or dataclasses. If the task involves running Python, managing Python dependencies, creating environments, or building Python packages, load this skill and prefer uv-oriented workflows.
npx skill4agent add anntnzrb/agents python.pypyproject.toml1. MODEL -> types, invariants, boundaries
2. COMPOSE -> pure functions, pipelines, small modules
3. VALIDATE -> parse at edges, return errors early
4. TEST -> pytest, fixtures, async tests
5. HARDEN -> ruff + format + mypy + regression testsuvuvpythonpippoetrypython -m venvuv run python script.py
uv run pytest
uv run --with requests python script.py
uv add requests pydantic httpx
uv add --dev pytest pytest-asyncio mypy ruff
uv venv
uv run python -m ast path/to/file.py >/dev/null
uv init --script example.py --python 3.12
uv add --script example.py requests rich
uv lock --script example.pypython script.pyuv run python script.pypython -m pytestuv run pytestpip install xuv add xpython -m venv .venvuv venvpython -m py_compile foo.pyuv run python -m ast foo.py >/dev/null# /// script
# requires-python = ">=3.12"
# dependencies = [
# "requests<3",
# "rich",
# ]
# ///uv run script.pyuv init --script script.py --python 3.12
uv add --script script.py requests rich
uv lock --script script.py#!/usr/bin/env -S uv run --script
# /// script
# dependencies = ["httpx"]
# ///uv init my-project && cd my-project
uv add requests pydantic httpx
uv add --dev pytest pytest-asyncio mypy ruff
uv run python script.py
uv run pytestuv run ruff check src/
uv run ruff format --check src/
uv run mypy src/
uv run pytestuv_buildhatchling[build-system]
requires = ["uv_build>=0.9.28,<0.10.0"]
build-backend = "uv_build"src/uvpippip3poetrypython -m venvreference.mdcookbook/async.mdcookbook/patterns*.mdcookbook/testing*.mdcookbook/modern*.md# gh search code for real-world examples
gh search code "asyncio.TaskGroup(" --language=python
gh search code "class.*Protocol):" --language=python
gh search code "async with httpx.AsyncClient(" --language=python