Python
cheat sheets.
Web APIs, validation, data pipelines, databases, and tests. These references cover FastAPI, Pydantic, Polars, SQLAlchemy, and pytest.
FastAPI
Python web APIs
Routes, request validation, dependencies, SQLAlchemy, authentication, and testing.
Pydantic & core
Data validation and serialization
Models, validators, serialization, settings, custom types, and pydantic-core.
Polars
DataFrames and data pipelines
Expressions, joins, file formats, reporting, lazy queries, and streaming.
SQLAlchemy
ORM queries and transactions
Models, queries, relationships, and transactions, with matching SQL examples.
pytest
Python tests and fixtures
Assertions, fixtures, parametrization, mocks, async tests, and plugins.
What are you working on?
Go straight to the code and explanation for a specific task.
Help improve CodeRef
Allow Google Analytics to measure page visits and use of the guides? It uses cookies after you accept. Your choice won’t affect access to the site. Privacy notice