Get AI summaries of any video or article — Sign up free

Corey Schafer — Channel Summaries — Page 2

AI-powered summaries of 140 videos about Corey Schafer.

140 summaries

No matches found.

Python Quick Tip: The Difference Between "==" and "is" (Equality vs Identity)

Corey Schafer · 2 min read

In Python, the difference between `==` and `is` comes down to what gets compared: `==` checks whether two values are equal in content, while `is`...

Equality vs IdentityPython OperatorsMutable Lists

Python Tutorial: Namedtuple - When and why should you use namedtuples?

Corey Schafer · 2 min read

Namedtuples offer a practical middle ground between plain tuples and dictionaries: they keep tuple behavior (including immutability) while making...

NamedtupleRGB ColorsReadability

Python Tutorial: AsyncIO - Complete Guide to Asynchronous Programming with Animations

Corey Schafer · 3 min read

AsyncIO in Python delivers real concurrency only when code yields control to the event loop—meaning I/O-bound work must use awaitable operations...

AsyncIO FundamentalsEvent Loop SchedulingTasks vs Coroutines

Python Flask Tutorial: How to Use a Custom Domain Name for Our Application

Corey Schafer · 3 min read

Adding a custom domain to a Flask app deployed on a private Linux server hinges on one practical sequence: buy a domain, point its DNS to the...

Domain RegistrationDNS Name ServersA Records

Programming Terms: Mutable vs Immutable

Corey Schafer · 2 min read

Mutable vs. immutable is a practical distinction about whether an object’s contents can change after creation—and it directly affects both...

Mutable vs ImmutablePython StringsPython Lists

SQL Tutorial for Beginners 4: SELECT - Retrieving Records from Your Database

Corey Schafer · 2 min read

Retrieving specific data from a database starts with the SQL `SELECT` statement, and the practical path is: choose which columns to return, filter...

SQL SELECTWHERE FilteringAND vs OR

Python Tutorial: Ruff - A Fast Linter & Formatter to Replace Multiple Tools and Improve Code Quality

Corey Schafer · 2 min read

Ruff is positioned as an all-in-one, Rust-based Python linter and formatter that can replace a patchwork of tools—while running fast enough to make...

Ruff SetupPython LintingAutofix and Diff

SQL Tutorial for Beginners 3: INSERT - Adding Records to Your Database

Corey Schafer · 2 min read

Populating a database table starts with the INSERT statement, and the key practical detail is how SQL matches the values you provide to the table’s...

SQL INSERTDatabase RecordsColumn Mapping

Programming Terms: Memoization

Corey Schafer · 2 min read

Memoization is an optimization technique that speeds up programs by caching the results of expensive function calls and reusing them when the same...

MemoizationCachingOptimization

Python Coding Problem: Creating Your Own Iterators

Corey Schafer · 2 min read

Creating a custom Python iterator for a sentence—and contrasting it with a generator that yields the same words—shows how iteration state is tracked...

IteratorsIterablesPython Generators

Python Tutorial: Pathlib - The Modern Way to Handle File Paths

Corey Schafer · 3 min read

Pathlib is poised to replace Python’s OS-based path handling because it turns file paths into readable, safer objects instead of brittle...

Pathlib BasicsAbsolute vs Relative PathsGlob Searching

Automate Your Development Environment Setup with Scripts and Dotfiles

Corey Schafer · 3 min read

A repeatable, from-scratch setup for a new development Mac is built by combining a GitHub “dotfiles” repository with install scripts that automate...

DotfilesDevelopment Environment SetupHomebrew Cask

VirtualBox: How to Use Snapshots

Corey Schafer · 2 min read

VirtualBox snapshots let administrators save a virtual machine’s exact state—settings, disk contents, and optionally memory—so they can roll back...

VirtualBox SnapshotsSnapshot BranchingGuest Additions

How I Setup a New Development Machine - Using Scripts to Automate Installs and Save Time

Corey Schafer · 3 min read

A new MacBook can be turned into a fully working development environment in under 10 minutes by combining Homebrew with a personal “dotfiles”...

Dotfiles AutomationHomebrew SetupTerminal Configuration

Python Pydantic Tutorial: Complete Data Validation Course (Used by FastAPI)

Corey Schafer · 3 min read

Pydantic is positioned as a practical replacement for hand-written validation: define a model with Python type hints, and Pydantic enforces those...

Pydantic Data ValidationPydantic v2 ModelsField Constraints

Customizing Your Terminal: How To Use and Modify Dotfiles

Corey Schafer · 2 min read

Custom dotfiles can turn a plain terminal into a highly informative workspace—complete with a color-coded prompt, Git status indicators, smarter...

DotfilesBash PromptGit Status

Git Tutorial: Difference between "add -A", "add -u", "add .", and "add *"

Corey Schafer · 2 min read

Git add’s different flags all target the staging area, but they differ sharply in which kinds of changes they include: modified vs. new (untracked)...

Git add FlagsStaging AreaDeleted Files

Python Tutorial: Else Clauses on Loops

Corey Schafer · 2 min read

An `else` clause attached to a Python loop runs only when the loop finishes normally—meaning it never encounters a `break`. That single rule resolves...

Loop ElseControl FlowBreak Semantics

Programming Terms: DRY (Don't Repeat Yourself)

Corey Schafer · 2 min read

DRY—“Don’t Repeat Yourself”—is a software development principle that targets repeated information in code because repetition makes systems harder to...

DRY PrincipleCode RefactoringPython Functions

Programming Terms: Combinations and Permutations

Corey Schafer · 2 min read

Combinations and permutations differ in one crucial way: whether the order of selected items matters. A combination counts groups where rearranging...

Combinations vs PermutationsOrder MattersPython Itertools

Programming Terms: Idempotence

Corey Schafer · 2 min read

Idempotence means an operation can be repeated multiple times without changing the outcome after the first application. In practical programming...

IdempotenceHTTP MethodsPython Functions

Python Tutorial: Securely Manage Passwords and API Keys with DotEnv

Corey Schafer · 2 min read

Using python-dotenv (imported as “dotenv” in code) to load environment variables from a local .env file lets developers keep API keys and other...

Environment Variablespython-dotenv.env Syntax

Python Tkinter Tutorial (Part 2): Using Classes for Functionality and Organization

Corey Schafer · 2 min read

Using Tkinter with classes fixes a common “wrong widget” bug that appears when event handlers rely on global variables and duplicated widget names....

Tkinter ClassesEvent HandlersFrame Encapsulation

Python Tutorial: Type Hints - From Basic Annotations to Advanced Generics

Corey Schafer · 3 min read

Type hints in Python become genuinely useful only when paired with a type checker—otherwise they’re mostly documentation. Using MyPy (via the VS Code...

Type Hints BasicsOptional UnionsType Aliases

Python Tutorial: Generate a Web Portfolio and Resume from One JSON File

Corey Schafer · 2 min read

A single JSON file can drive both a web portfolio and a traditional one-page resume—generated automatically by Python—so updates never fall out of...

JSON DataJinja2 TemplatesStatic HTML Generation

Python Tutorial: Type Hinting vs Type Checking vs Data Validation - What’s the Difference?

Corey Schafer · 3 min read

Python’s type hints, type checking, and data validation solve different problems—even though all three relate to “types.” Type hints document what...

Type HintingStatic Type CheckingRuntime Data Validation

Python FastAPI Tutorial (Part 2): HTML Frontend for Your API - Jinja2 Templates

Corey Schafer · 1 min read

FastAPI keeps its JSON API endpoints, but adds human-friendly HTML pages by wiring Jinja2 templates into new “page routes.” The key move is switching...

Jinja2 TemplatesTemplate InheritanceFastAPI Static Files

Python FastAPI Tutorial (Part 5): Adding a Database - SQLAlchemy Models and Relationships

Corey Schafer · 3 min read

The core shift is replacing FastAPI’s in-memory “posts” list with a real SQLAlchemy-backed database so data persists across server restarts—and then...

FastAPISQLAlchemySQLite

Python FastAPI Tutorial (Part 3): Path Parameters - Validation and Error Handling

Corey Schafer · 2 min read

FastAPI path parameters let a single URL target one specific resource—while type hints automatically enforce validation and generate clear...

Path ParametersAutomatic ValidationHTTP Status Codes

I Let Python Pick My March Madness Bracket - Bracket Simulation Tutorial

Corey Schafer · 3 min read

A Python bracket simulator can generate “realistic enough” March Madness outcomes by giving higher-seeded teams better odds—while still allowing...

March Madness Bracket SimulationPython DataclassesSeed-Weighted Probabilities

Python FastAPI Tutorial (Part 4): Pydantic Schemas - Request and Response Validation

Corey Schafer · 3 min read

FastAPI’s request/response validation becomes concrete once Pydantic schemas define the API contract—what clients must send and what the server will...

Pydantic SchemasRequest ValidationResponse Validation

Python FastAPI Tutorial (Part 10): Authentication - Registration and Login with JWT

Corey Schafer · 3 min read

Authentication is wired into the FastAPI app by adding secure password hashing (Argon 2), JWT access tokens, and backend endpoints for registration,...

JWT AuthenticationArgon 2 Password HashingFastAPI OAuth2

Python FastAPI Tutorial (Part 7): Sync vs Async - Converting Your App to Asynchronous

Corey Schafer · 3 min read

The core takeaway is that FastAPI can run routes either synchronously or asynchronously, but the performance payoff from async only materializes when...

Async vs Sync RoutesAsync SQLAlchemyEager Loading

Python FastAPI Tutorial (Part 6): Completing CRUD - Update and Delete (PUT, PATCH, DELETE)

Corey Schafer · 2 min read

CRUD in FastAPI is completed for both posts and users by adding full update (PUT), partial update (PATCH), and deletion (DELETE), with careful...

FastAPI CRUDPUT vs PATCHCascade Delete

Python FastAPI Tutorial (Part 11): Authorization - Protecting Routes and Verifying Current User

Corey Schafer · 3 min read

Authorization becomes real only after the API stops trusting client-supplied user IDs. This tutorial turns a working JWT login system into route...

JWT AuthorizationFastAPI DependenciesRoute Protection

Python FastAPI Tutorial (Part 9): Frontend Forms - Connecting JavaScript to Your API

Corey Schafer · 3 min read

A working CRUD workflow now runs from the browser: Bootstrap modals collect user input, JavaScript uses the fetch API to call FastAPI JSON endpoints,...

FastAPI CRUDBootstrap ModalsJavaScript Fetch

Python FastAPI Tutorial (Part 8): Routers - Organizing Routes into Modules with APIRouter

Corey Schafer · 2 min read

FastAPI route organization gets a major upgrade by moving API endpoints out of a bloated main.py file and into dedicated modules using APIRouter. The...

FastAPI RoutersAPIRouterRoute Organization

Python FastAPI Tutorial (Part 13): Pagination - Loading More Data with Query Parameters

Corey Schafer · 3 min read

Pagination moves the app from “send everything” to “send only what the client needs,” and the payoff is immediate: faster loads, less wasted...

PaginationFastAPISQLAlchemy

Python FastAPI Tutorial (Part 14): Password Reset - Email, Tokens, and Background Tasks

Corey Schafer · 2 min read

A complete password reset system for a FastAPI blog app comes together by combining three security requirements—unguessable, expiring, single-use...

Password ResetAsync EmailToken Security

Python FastAPI Tutorial (Part 15): PostgreSQL and Alembic - Database Migrations for Production

Corey Schafer · 3 min read

The tutorial’s core shift is replacing SQLite plus “create tables on startup” with PostgreSQL plus Alembic-style migrations (via SQLAlchemy’s...

PostgreSQL SetupDatabase MigrationsOlympic