Importing, tagging, querying, and organizing a music library with beets — config, plugins, queries, and common workflows on Windows.
The Anthropic Claude API — Python and TypeScript SDKs, streaming, tool use, batches, prompt caching, files, vision, and agentic loops.
Complete Python SDK reference for the Anthropic Claude API — messages, streaming, vision, extended thinking, prompt caching, batch processing, and token counting.
Build LLM programs in DSPy with declarative signatures, modules, and optimisers. Covers Predict, ChainOfThought, ReAct, BootstrapFewShot, COPRO, MIPRO, MIPROv2, and inference compilation.
Build production-grade LLM pipelines with Haystack 2.x. Covers components, the pipeline graph, indexing and querying, retrievers, generators, RAG patterns, and evaluation.
Model Context Protocol (MCP) framework overview. Covers client/server architecture, stdio vs SSE vs streamable HTTP transports, FastMCP, mcp-go, the Python and TypeScript SDKs, and comparison with custom tool servers.
Build LLM-powered applications with Microsoft Semantic Kernel. Covers the kernel, plugins, prompt templates, planners, function calling, Kernel Memory, Python and .NET SDKs.
Cheat sheets for third-party PyPI packages — HTTP clients, data tools, validation, terminal UIs, and more.
Parse command-line arguments with Python's stdlib argparse module. Covers positional/optional args, subparsers, nargs, validation, mutually exclusive groups, FileType, env-var fallbacks, and argcomplete.
Parse, search, and mutate HTML/XML with BeautifulSoup 4. Covers parser choice (html.parser/lxml/html5lib), find/find_all/select, tree navigation, attribute access, and pairing with requests/httpx/playwright for end-to-end scraping.
Define typed data containers with @dataclass — frozen, slots, kw_only, default_factory, __post_init__, asdict, replace, and how it compares to attrs, pydantic, NamedTuple, TypedDict.
Work with dates, times, and timezones in Python using the stdlib datetime module and zoneinfo. Covers aware vs naive datetimes, ISO-8601 parsing, strftime/strptime, timedelta arithmetic, and DST handling.
Overview of the 34 most useful Python packages — HTTP clients, data science, web frameworks, orchestration, testing, and tooling. Each has its own dedicated page with examples.
Build high-performance async REST APIs with FastAPI. Covers path params, request bodies, Pydantic models, dependency injection, and auto-generated OpenAPI docs.
Build lightweight web apps and REST APIs with Flask. Covers routes, request handling, JSON responses, blueprints, and the debug-server warning.
Make sync and async HTTP requests with httpx. Covers GET/POST, async usage, HTTP/2, streaming, and how it compares to requests.
Choose your OS and get Python installed in minutes. Covers Windows, WSL/Ubuntu, macOS, and Linux with recommended versions and verification steps.
Install Python 3 on Debian/Ubuntu, Fedora/RHEL, and Arch Linux. Covers package managers, pyenv, and building from source for unsupported distros.
Install Python 3 on macOS via Homebrew or pyenv. Explains the system-Python warning, PATH precedence, and verification steps.
Install Python 3 on Windows via winget or the python.org installer. Covers PATH setup, the py launcher, and verification steps.
Install Python 3 inside WSL2/Ubuntu via apt, the deadsnakes PPA, or pyenv. Covers the python3-venv quirk and version aliasing.
The two stdlib modules every Python developer pairs together — iterator algebra (chain, groupby, batched, pairwise) and function plumbing (lru_cache, partial, reduce, singledispatch, cached_property).
Encode and decode JSON in Python with the stdlib json module. Covers dumps/loads, indent/sort_keys/separators, custom default= and JSONEncoder, object_hook decoding, JSONL streaming, and orjson/ujson/msgspec comparison.
Configure Python's built-in logging module — loggers, handlers, formatters, dictConfig, rotation, structured records, and how it compares to loguru.
Pause, inspect, and step through Python programs with pdb. Covers breakpoint(), command reference, post-mortem debugging, conditional breakpoints, and enhanced alternatives like ipdb, pdbpp, and pudb.
Side-by-side feature comparison of pip and uv — speed, lock files, virtual envs, Python version management, and when to use each.
Manage Python project dependencies, virtual environments, and package publishing with Poetry. Covers pyproject.toml, lockfiles, groups, and publishing to PyPI.
Run linters, formatters, and validators automatically on every git commit. Covers .pre-commit-config.yaml, essential hooks (ruff, mypy, check-yaml), autoupdate, and CI integration.
Validate and parse data at runtime using Python type hints with Pydantic v2. Covers BaseModel, field validators, nested models, and JSON serialization.
The canonical config file for modern Python projects — [project] metadata, [build-system] backends (setuptools, hatchling, pdm-backend, poetry-core, flit-core), [tool.*] sections, dynamic versioning, scripts, building, and publishing.
Python's built-in regex module — compile vs not, match/search/findall/finditer/sub, named groups, lookarounds, verbose mode (re.X), and how it differs from PCRE.
Make HTTP requests in Python with the requests library. Covers GET/POST, JSON, sessions, authentication, retries, and common pitfalls.
Build classical ML pipelines with scikit-learn. Covers the estimator API, train_test_split, Pipeline, ColumnTransformer, cross-validation, metrics, and model persistence.
Build interactive web apps for data and ML in pure Python. Covers widgets, layout, session state, caching, multipage apps, and deployment patterns.
Run external commands from Python with subprocess. Covers run vs Popen, capture_output, streaming, pipes, timeouts, env/cwd overrides, and shlex quoting safety.
Go beyond list[int] and str | None. Covers Protocol, TypeVar bounds, ParamSpec, Concatenate, Self, Annotated, TypedDict with NotRequired/Required, TypeAlias, TypeGuard, TypeIs, cast, assert_type, and reveal_type.
Install packages and manage virtual environments blazingly fast with uv. Covers uv pip, uv venv, uv run, uv init, and how it compares to pip and poetry.
Create, activate, and manage Python virtual environments with venv. Covers activation for every shell, pip usage, requirements files, and cleanup.
Comprehensive reference for the sentence-transformers Python library — embeddings, similarity, clustering, retrieval, fine-tuning, and popular models (BGE, E5, GTE, Nomic, Jina).
Hugging Face Transformers, LangChain, Google Gemini SDK, and LangSmith — practical reference for AI/ML frameworks and observability tools.
Build multi-agent AI systems with Microsoft AutoGen. Covers agents, group chats, code execution, tool registration, async runtimes, and LLM configuration.
Store and query vector embeddings locally or over a network with ChromaDB. Covers client types, collections, add, query, metadata filters, embedding functions, and LangChain/LlamaIndex integration.
Orchestrate teams of role-playing AI agents with crewAI. Covers agents, tasks, crews, tools, LLM selection, memory, YAML config, and the kickoff lifecycle.
Call Google's Gemini models from Python for text, multimodal, streaming, chat, function calling, and embeddings. Covers the genai SDK, safety settings, file API, and async usage.
Interleave Python control flow with LLM generation and enforce structured output using guidance. Covers gen(), select(), chat blocks, regex constraints, JSON schemas, and token healing.
Build LLM-powered pipelines with LangChain. Covers LCEL chains, chat models, prompts, output parsers, tools, agents, retrievers, memory, and streaming.
Trace, debug, evaluate, and monitor LLM applications with LangSmith. Covers tracing setup, datasets, evaluators, prompt hub, comparing runs, and CI integration.
Build RAG pipelines and LLM-powered data applications with LlamaIndex. Covers document loading, indexing, query engines, custom LLMs and embeddings, persistent storage, and agents.
Automate Google NotebookLM from Python with the unofficial notebooklm-py library. Covers authentication, notebook and source management, summaries, FAQ generation, and audio podcast creation.
Store and search vector embeddings with the Qdrant Python client. Covers collections, CRUD, filtered vector search, payload indexing, batch upsert, sparse/dense hybrid search, and integrations.
Measure and improve RAG pipeline quality with ragas. Covers faithfulness, answer relevancy, context precision, context recall, dataset format, LLM judges, and CI integration.
Load and run pre-trained models for NLP, vision, and audio with the Hugging Face Transformers library. Covers pipelines, AutoModel, tokenisation, generation, fine-tuning, and device placement.
Evaluate and monitor LLM applications with TruLens. Covers the RAG triad, feedback functions, TruChain, TruLlama, custom evaluators, the dashboard, and CI integration.
Extract structured text from PDFs, Word docs, HTML, images, and more with the unstructured library. Covers partitioning, chunking, cleaning, metadata, and pipeline integrations.
Store, search, and manage vector embeddings with the Weaviate Python client. Covers collections, CRUD, vector/hybrid/BM25 search, multi-tenancy, generative search, and batch import.
Build, schedule, and observe data pipelines as software-defined assets with Dagster. Covers assets, jobs, schedules, sensors, resources, partitions, and the Dagster UI.
Run fast analytical SQL queries in-process with DuckDB. Covers Python API, CSV/Parquet ingestion, pandas interop, Arrow, window functions, and persistent databases.
Build fast, type-safe HTTP APIs and web apps with Litestar. Covers route handlers, path/query/body params, DTOs, dependency injection, middleware, WebSockets, and OpenAPI.
Speed up pandas workloads across all CPU cores with a one-line import swap. Covers Ray and Dask backends, config tuning, pandas interop, and when modin wins vs polars.
High-performance DataFrames with a lazy expression API. Covers read/write, select, filter, group_by, joins, LazyFrame, datetime, string operations, and pandas interop.
Build, schedule, and observe Python workflows with Prefect. Covers flows, tasks, retries, schedules, deployments, caching, concurrency, and Prefect Cloud.
Build interactive web applications entirely in Python with Reflex. Covers state, components, events, pages, database, forms, and deployment.
Define database models with Python type hints using SQLModel. Covers table creation, CRUD, relationships, FastAPI integration, Pydantic validation, and async sessions.
Add auto-updating progress bars to any Python loop or CLI pipeline with tqdm. Covers iterables, manual updates, pandas integration, nested bars, async, Jupyter, and byte-piping.
Build command-line interfaces using Python type annotations with Typer. Covers commands, options, arguments, subcommands, callbacks, rich output, and testing.
A reference hub for programming languages and their ecosystems — Python, JavaScript, and TypeScript, with package managers, runtimes, and tooling.
Complete pip reference covering installation, package management, requirements files, private registries, caching, offline installs, and reproducible builds.
Installation guides, essential packages, CLI snippets, and real-world recipes for Python 3.
Write concurrent Python code with asyncio. Covers coroutines, asyncio.run, gather, create_task, timeouts, queues, and avoiding the blocking-call pitfall.
Format Python code consistently with black. Covers installation, configuration, editor integration, and how it compares to ruff format.
Short standalone Python scripts for common tasks — file I/O, JSON manipulation, HTTP requests, CSV processing, and data transformation.
Build command-line interfaces with click using decorators. Covers commands, options, arguments, groups, prompts, and progress bars.
Build database-driven web applications with Django. Covers project setup, models, migrations, the admin panel, views, forms, class-based views, middleware, signals, ORM advanced patterns, and the management command workflow.
Run interactive Python notebooks with Jupyter. Covers JupyterLab setup, cell types, keyboard shortcuts, magic commands, nbconvert export, and common pitfalls.
Add structured, colorized logging to Python apps with loguru. Covers sinks, log levels, file rotation, retention, exception catching, and context binding.
Create publication-quality 2-D plots with matplotlib. Covers pyplot basics, subplots, savefig, common chart types, and the show-vs-save pitfall.
Catch type errors before runtime with mypy. Covers strict mode, common error codes, type: ignore annotations, gradual typing, and pyproject.toml configuration.
Create and manipulate N-dimensional arrays with NumPy. Covers array creation, broadcasting, vectorized math, indexing, and matrix operations.
Useful Python one-liners runnable directly from the shell with python -c or python -m. No file creation needed.
Load, filter, transform, and aggregate tabular data with pandas. Covers DataFrame creation, read_csv, groupby, merge, and the SettingWithCopy pitfall.
Work with filesystem paths using Python's built-in pathlib module. Covers Path creation, navigation, reading/writing files, glob patterns, and stat.
Open, resize, crop, convert, and save images with Pillow (PIL fork). Covers format conversion, filters, drawing, and EXIF handling.
Write and run Python tests with pytest. Covers test discovery, assertions, fixtures, parametrize, conftest, and common patterns.
Make terminal output beautiful with Rich. Covers styled print, Console, tables, progress bars, syntax highlighting, live displays, and the rich-cli command.
Lint and format Python code with ruff — a single Rust-powered tool that replaces flake8, isort, and black. Covers configuration, rule selection, and CI usage.
Statistical distributions, optimization, integration, signal processing, and linear algebra with SciPy. Builds on NumPy arrays.
Connect to databases, write queries, and define ORM models with SQLAlchemy 2.0. Covers the engine, sessions, Core queries, ORM declarative models, relationships, session lifecycle, migrations with Alembic, and connection pool configuration.
navigation
actions
cheat sheet pages