A library of interactive Python guides

Python, Visually

Learn Python by running it. Every guide is a set of notebooks that open in Google Colab: read a little, run a cell, change it, run it again. Nothing to install and nothing to set up.

New to Python? Start with Python from the Start. The guides below are in reading order.

93guides
250notebooks planned
172written so far
0things to install

How a notebook works. A notebook opens in Google Colab and runs in your browser. It contains the explanation, worked examples you can edit, exercises to try, and a section on the errors that part of Python actually produces, with the real message shown.

The exercises are the point. Every notebook has a separate solutions file, so the answer is never sitting one scroll below the question.

The guides

Foundations teaches the language itself, and is best worked through in order: each guide depends on the one before it. The deep dives take one library apiece, grouped by what the library is for, and any of them can be read once you have the foundations it names. Projects puts everything to work on real problems.

Foundations
1Python from the StartThe language itself21Complete
2Files, Paths and FormatsGetting data in and out10Complete
3Object-Oriented PythonClasses, and when not to use them14Complete
4APIs and JSONTalking to the rest of the internet18Complete
5Testing and PackagingMaking it survive contact with other people10Complete
Relational and Document Databases
6SQLAlchemy, Deep DiveSessions, models and the SQL underneath20Complete
7SQLModel, Deep DiveOne model for the table and the API14Complete
8Peewee, Deep DiveA small mapper, end to end12Complete
9sqlite3, Deep DiveThe database already on your machine20Complete
10asyncpg and psycopg3, Deep DivePostgreSQL, from Python17Complete
11PyMongo and Beanie, Deep DiveDocuments instead of rows16Complete
Data Science and Machine Learning
12NumPy, Deep DiveArrays, shapes and vectorization14Planned
13Pandas, Deep DiveTabular data, properly18Planned
14scikit-learn, Deep DiveEstimators, pipelines, evaluation14Planned
15PyTorch and TensorFlow, Deep DiveTensors, gradients and training loopsPlanned
16LightGBM and XGBoost, Deep DiveGradient boosting on tablesPlanned
17GeoPandas, Deep DiveTables with geometry in themPlanned
18Shapely, Deep DivePoints, lines and polygonsPlanned
Data Engineering and Analytics
19Polars, Deep DiveExpressions, and the query it plansPlanned
20DuckDB, Deep DiveSQL over files, with no serverPlanned
21PyArrow, Deep DiveThe columnar format underneathPlanned
22PySpark, Deep DiveWhen the data outgrows the machinePlanned
Statistics and Econometrics
23SciPy, Deep DiveOptimization, signals and statistics12Planned
24Statsmodels, Deep DiveRegression with a summary tablePlanned
25PyMC, Deep DiveBayesian models you can samplePlanned
26Pingouin, Deep DiveTests that print a tablePlanned
AI Agents and Retrieval
27LlamaIndex, Deep DiveYour documents, made retrievablePlanned
28Haystack, Deep DiveSearch pipelines that reach productionPlanned
29DSPy, Deep DivePrompts written by a programPlanned
30LangChain and LangGraph, Deep DiveTools, state and the loopPlanned
31CrewAI, Deep DiveAgents with rolesPlanned
32AutoGen, Deep DiveAgents that talk, and run codePlanned
33PydanticAI, Deep DiveAnswers your code can trustPlanned
34smolagents, Deep DiveAgents that write PythonPlanned
LLM Training, Fine-Tuning and Serving
35Unsloth, Deep DiveFine-tuning that fits in your memoryPlanned
36Axolotl, Deep DiveA training run from one filePlanned
37Torchtune, Deep DiveRecipes you can readPlanned
38LLaMA-Factory, Deep DiveMany models, many methodsPlanned
39PEFT and TRL, Deep DiveAdapters, and training on preferencesPlanned
40Accelerate, Deep DiveOne script, several cardsPlanned
41DeepSpeed and Megatron-LM, Deep DiveTraining that will not fitPlanned
42PyTorch FSDP, Deep DiveSharding, in PyTorch itselfPlanned
43vLLM, Deep DiveServing a model to many peoplePlanned
44llama-cpp-python and Ollama, Deep DiveModels on your own machinePlanned
Computer Vision and Image Processing
45OpenCV, Deep DiveFrames, filters and featuresPlanned
46Ultralytics YOLO, Deep DiveDetection, segmentation and trackingPlanned
47MediaPipe, Deep DiveFaces, hands and pose, in real timePlanned
48Pillow and Albumentations, Deep DiveLoading images, and changing them on purposePlanned
Voice, Speech and Audio
49Whisper and faster-whisper, Deep DiveSpeech to text, offlinePlanned
50Vosk, Deep DiveRecognition on a small machinePlanned
51SpeechRecognition, Deep DiveOne interface, several enginesPlanned
52Coqui TTS and XTTS, Deep DiveSynthetic speech, and cloned voicesPlanned
53edge-tts, Deep DiveHundreds of voices, over the networkPlanned
54pyttsx3, Deep DiveThe voices already installedPlanned
55Librosa, Deep DiveWhat a sound looks likePlanned
56Pydub and PyAudio, Deep DiveEditing audio, and recording itPlanned
Game Development
57Pygame and Pygame CE, Deep DiveThe loop, the sprite and the clockPlanned
58Arcade, Deep Dive2D with the graphics card doing the workPlanned
59Pyglet, Deep DiveWindows, graphics and no dependenciesPlanned
60Ursina, Deep Dive3D, quicklyPlanned
61Panda3D, Deep DiveA 3D pipeline you controlPlanned
62UPBGE, Deep DiveGames inside BlenderPlanned
63Ren'Py, Deep DiveBranching stories, and savesPlanned
64Pymunk, Deep DivePhysics you can trustPlanned
Web Frameworks and Networking
65FastAPI, Deep DiveAsynchronous APIs, typed and documentedPlanned
66Django, Deep DiveThe framework that brings everythingPlanned
67Flask, Deep DiveSmall, until you decide otherwisePlanned
68Requests and httpx, Deep DiveSessions, timeouts and retriesPlanned
69BeautifulSoup and Scrapy, Deep DiveReading a page, and crawling a sitePlanned
Interactive Apps and Visualization
70Matplotlib, Deep DivePlots you can defend12Planned
71Seaborn, Deep DiveStatistical plots in one linePlanned
72Plotly, Deep DiveCharts that answer backPlanned
73Streamlit, Deep DiveA script that becomes an appPlanned
74Gradio, Deep DiveA demo somebody else can tryPlanned
Workflow Orchestration and Background Work
75Dagster and Prefect, Deep DivePipelines that know their dependenciesPlanned
76Apache Airflow, Deep DiveSchedules, and filling in the pastPlanned
77Celery, Deep DiveWork that happens laterPlanned
Developer Tooling and Quality
78pytest, Deep DivePlugins, and testing hard thingsPlanned
79Pydantic, Deep DiveTypes checked while the program runsPlanned
80uv and Ruff, Deep DiveFast tools for the dull partsPlanned
Finance and Quantitative Analysis
81yfinance, Deep DiveMarket data, into a DataFramePlanned
82Backtrader, Deep DiveA strategy, tested against the pastPlanned
83TA-Lib, Deep DiveIndicators, computed correctlyPlanned
84CCXT, Deep DiveOne client, many exchangesPlanned
Documents and File Formats
85pypdf and PyMuPDF, Deep DiveText out of a PDF, and pages back inPlanned
86openpyxl and XlsxWriter, Deep DiveSpreadsheets, written properlyPlanned
87python-docx, Deep DiveWord documents from codePlanned
Parallel Computing and Concurrency
88Ray, Deep DivePython across a clusterPlanned
89Dask, Deep DiveNumPy and Pandas, in parallelPlanned
90Joblib, Deep DiveA parallel loop, and a cachePlanned
Security and Networking
91Scapy, Deep DivePackets, built and readPlanned
92Impacket, Deep DiveProtocols at the level attackers usePlanned
Projects
93Projects, End to EndEverything at once8Planned