Learn Python - Free Tutorials & AI Guides

Free Python Tutorials, AI Guides & Coding Projects

AI Inference
Vanna Source Tour: Inside the Text-to-SQL Agent Framework

Vanna Source Tour: Inside the Text-to-SQL Agent Framework

Vanna is an open-source Python framework that turns natural-language questions into SQL queries and, ultimately, into charts and summaries. You feed it your schema (DDL), business documentation, and sample queries; it embeds and stores them, then retrieves the most relevant...

AI Inference
Ray Source Tour: How Tasks, Actors and the Object Store Fit Together

Ray Source Tour: How Tasks, Actors and the Object Store Fit Together

Ray began as a research project at UC Berkeley and grew into what its README now calls “a unified framework for scaling AI and Python applications.” The pitch is simple: the same Python you run on your laptop should run...

AI Inference
Pydantic source tour: how BaseModel turns type hints into validators and serializers

Pydantic source tour: how BaseModel turns type hints into validators and seri...

Pydantic is the quiet dependency under a remarkable amount of the modern Python stack. If you have ever declared a FastAPI endpoint, asked an LLM for structured output with instructor, defined tools with the MCP Python SDK, or let an...

AI Inference
Arize Phoenix Source Tour: Inside the Open-Source OTel-Native LLM Tracing Server

Arize Phoenix Source Tour: Inside the Open-Source OTel-Native LLM Tracing Server

If you have ever shipped an LLM application and then asked “what did the model actually see, and what did it answer?”, you already understand the problem Arize set out to solve with Phoenix. Phoenix is an open-source, OpenTelemetry-native observability...

AI Inference
Opik: A Source Tour of Comet's Open-Source LLM Observability Stack

Opik: A Source Tour of Comet's Open-Source LLM Observability Stack

If you have shipped anything with an LLM in it, you know the feeling: the demo worked, and then production happened. Prompts drift, models get swapped, retrieval silently degrades, and nobody can say which call returned what. Opik is Comet’s...

AI Inference
MLflow Source Tour: From Fluent API to Backend Stores and the Model Registry

MLflow Source Tour: From Fluent API to Backend Stores and the Model Registry

MLflow describes itself on its README as “The Open Source AI Engineering Platform for Agents, LLMs & Models,” and the claim is not marketing fluff: the project reports over 60 million monthly downloads, and the repository is one of the...

AI Inference
Inside Matplotlib: A Source-Level Architecture Tour of Python's Plotting Library

Inside Matplotlib: A Source-Level Architecture Tour of Python's Plotting Library

Matplotlib has been the default way to draw a picture of your data in Python for more than two decades. Its README describes it as a comprehensive library for creating static, animated, and interactive visualizations, one that produces publication-quality figures...

AI Inference
huggingface_hub: A Source Tour of the Python Client Behind the Hugging Face Hub

huggingface_hub: A Source Tour of the Python Client Behind the Hugging Face Hub

Every time you call from_pretrained in [transformers](/transformers/) — well, not quite. What actually fetches the weights is a smaller, quieter package underneath: huggingface_hub. It is the client library that speaks to the Hub's REST API, moves terabytes of model weights...

AI Inference
FastAPI Source Tour: How Requests, Dependencies and OpenAPI Are Wired Together

FastAPI Source Tour: How Requests, Dependencies and OpenAPI Are Wired Together

FastAPI has quietly become the default answer to “how do I expose this Python function over HTTP?” — for data science teams shipping models, for backend teams building microservices, and increasingly for LLM tooling that needs a clean JSON surface....

AI Inference
Apache Airflow Source Tour: How Airflow 3 Schedules, Executes, and Serves Your DAGs

Apache Airflow Source Tour: How Airflow 3 Schedules, Executes, and Serves You...

Apache Airflow is the open-source orchestrator that turned “cron jobs with dependencies” into a programmable, observable discipline. If you have ever waited on a nightly data load, chained an extraction step to a training job, or retried a flaky API...

AI Inference
USearch Architecture: A Source Tour of Unum's Single-Header Vector Search Engine

USearch Architecture: A Source Tour of Unum's Single-Header Vector Search Engine

Most vector databases you encounter are services: a server process, a network protocol, a deployment story. USearch from Unum-cloud takes the opposite path. It is a single-file C++11 header — include/usearch/index.hpp — that implements a multi-layer proximity graph for approximate...

AI Inference
txtai Source Tour: Inside the Embeddings Database Engine

txtai Source Tour: Inside the Embeddings Database Engine

Most vector-search libraries hand you an index and stop there. txtai, from NeuML, takes the wider view: it is an embeddings database — a Python platform where you index text, documents, audio, images and video, keep the original content in...

AI Inference
pgvector Source Tour: How Vector Search Lives Inside Postgres

pgvector Source Tour: How Vector Search Lives Inside Postgres

Every retrieval-augmented application eventually faces the same storage question: where do the embeddings live? Many teams end up syncing a vector file with a relational database, and paying for two systems that drift apart. pgvector takes the opposite approach: it...

AI Inference
OpenAI Evals: A Source Tour of the LLM Evaluation Framework

OpenAI Evals: A Source Tour of the LLM Evaluation Framework

Every serious LLM project eventually hits the same wall: you changed one word in a prompt, or swapped one model checkpoint for another, and you have no idea whether the output got better or worse. OpenAI’s answer is evals, the...

AI Inference
Modin Source Tour: How One Import Scales pandas Across Every Core

Modin Source Tour: How One Import Scales pandas Across Every Core

pandas has a scaling problem that every data scientist eventually hits: it is single-threaded, and the moment your dataset outgrows a fraction of your machine’s memory, workflows that felt snappy on a laptop become slow, swap-thrashing misery. Modin is a...

AI Inference
Marqo Source Tour: Inside the AI-Native Vector Search Engine's Architecture

Marqo Source Tour: Inside the AI-Native Vector Search Engine's Architecture

Marqo is an open-source vector search engine with a simple pitch: you hand it documents — text, images, or mixed content — and it generates embeddings for you, stores them, and lets you query them in natural language through a...

AI Inference
Inside LM Evaluation Harness: How EleutherAI Turns a Model and a YAML File into a Benchmark Score

Inside LM Evaluation Harness: How EleutherAI Turns a Model and a YAML File in...

Every benchmark leaderboard you have seen — MMLU, HellaSwag, GSM8K — is computed by software that has to make hundreds of small, boring decisions correctly: how the prompt is assembled, how many few-shot examples are drawn and from which split,...

AI Inference
LlamaIndex Source Tour: How the Data Framework for LLM Apps Is Assembled

LlamaIndex Source Tour: How the Data Framework for LLM Apps Is Assembled

Ask a room of Python developers how they wire private documents into large language models, and sooner or later the answer will be LlamaIndex. The run-llama/llama_index repository is the home of that framework: a data layer that connects files, APIs,...

AI Inference
Instructor Source Tour: How the Structured-Outputs Library Turns LLM JSON Into Pydantic Models

Instructor Source Tour: How the Structured-Outputs Library Turns LLM JSON Int...

If you have ever extracted structured data from an LLM, you have probably met Instructor: define a Pydantic model, hand it to client.chat.completions.create(response_model=...), and get back a validated, typed object instead of a string of JSON you have to scrape...

AI Inference
Guidance Source Tour: The Architecture Behind Constrained LLM Generation

Guidance Source Tour: The Architecture Behind Constrained LLM Generation

Most libraries that talk to language models treat the model as an oracle: you send a prompt, you get text back, and you pray it parses. Guidance — the open-source project maintained under the guidance-ai organization and originally developed at...

AI Inference
Coqui TTS Anatomy: the Zoo Facade, the Wrappers, the Vocoder Shelf - Inside coqui-ai/TTS

Coqui TTS Anatomy: the Zoo Facade, the Wrappers, the Vocoder Shelf - Inside c...

Text-to-speech is the rare field where the whole lineage of a decade still runs side by side: attention-based seq2seq models from 2017, flow-based generators from 2020, adversarial end-to-end systems, and the GPT-style voice cloners of the streaming era. The Coqui...

AI Inference
Polars Under the Hood: How a Rust DataFrame Engine Rebuilt Python Data Work

Polars Under the Hood: How a Rust DataFrame Engine Rebuilt Python Data Work

Every Python developer eventually hits the same wall: a table too big for memory, a join that takes twenty minutes, a group-by that spills into swap. The usual answer has been to rent a bigger machine or to retreat into...

AI Inference
OpenCV Source Tour: From the Mat Container to the DNN Engine Inside the World's Default Vision Library

OpenCV Source Tour: From the Mat Container to the DNN Engine Inside the World...

OpenCV is the library that every other computer vision tool gets compared to. Twenty-plus years in, it is the default import in tutorials, the runtime under countless factory robots and security cameras, and the compatibility target that newer frameworks measure...

AI Inference
Numba, From @jit to Machine Code: A Source Tour of the LLVM-Based JIT Compiler for Python

Numba, From @jit to Machine Code: A Source Tour of the LLVM-Based JIT Compile...

Numba occupies a unique spot in the Python performance world: it is a compiler that ships as a pip package. You put a decorator on a plain Python function, call the function once, and by the time that call returns,...

Watch PyShine on YouTube