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

Corey Schafer — Person Summaries

AI-powered summaries of 95 videos about Corey Schafer.

95 summaries

No matches found.

Python OOP Tutorial 1: Classes and Instances

Corey Schafer · 2 min read

Python’s class system is presented as a practical way to bundle related data and behavior into reusable blueprints—especially when you need many...

Object-Oriented ProgrammingClassesInstances

Python Tutorial for Beginners 1: Install and Setup for Mac and Windows

Corey Schafer · 2 min read

Getting Python running on your computer is the whole point of this beginner setup walkthrough—and it’s handled separately for Mac and Windows, then...

Python InstallationmacOS SetupWindows PATH

Jupyter Notebook Tutorial: Introduction, Setup, and Walkthrough

Corey Schafer · 3 min read

Jupyter Notebooks turn code, results, plots, and explanations into a single interactive document—so users can run computations in small steps, see...

Jupyter Notebooks SetupKernels and Execution OrderMarkdown and Cell Modes

Python Flask Tutorial: Full-Featured Web App Part 1 - Getting Started

Corey Schafer · 2 min read

Flask is set up as a practical path to building a full-featured blog-style web app—complete with user registration and login, password reset emails,...

Flask SetupRoutingDebug Mode

Python Tutorial: File Objects - Reading and Writing to Files

Corey Schafer · 2 min read

Python file objects hinge on two practical choices: opening files in the right mode and managing their lifecycle safely. Using open() without cleanup...

File ModesContext ManagersReading Strategies

Python Tutorial for Beginners 2: Strings - Working with Textual Data

Corey Schafer · 3 min read

Python strings are the core way Python represents textual data, and the practical skill is learning how to define them safely, inspect them, and...

StringsQuoting RulesIndexing and Slicing

Python OOP Tutorial 2: Class Variables

Corey Schafer · 2 min read

Class variables let one shared value live on a class and be reused across every instance—perfect for data that should stay consistent company-wide,...

Class VariablesInstance VariablesAttribute Lookup

Python Tutorial for Beginners 5: Dictionaries - Working with Key-Value Pairs

Corey Schafer · 2 min read

Python dictionaries store data as key–value pairs, letting programmers look up values by a unique key—similar to how a physical dictionary maps words...

DictionariesKey-Value PairsDictionary Methods

Python OOP Tutorial 3: classmethods and staticmethods

Corey Schafer · 2 min read

Class methods and static methods solve two different problems in Python class design: class methods let code operate on shared class-level state (and...

Class MethodsStatic MethodsAlternative Constructors

Python Tutorial: Unit Testing Your Code with the unittest Module

Corey Schafer · 3 min read

Unit testing in Python with the built-in `unittest` module is presented as a practical way to catch breakages during refactoring and...

Unit Testingunittest ModuleAssertions

Regular Expressions (Regex) Tutorial: How to Match Any Pattern of Text

Corey Schafer · 3 min read

Regular expressions let people search text by pattern, not by exact wording—turning messy, variable data (like phone numbers, emails, and URLs) into...

Regex BasicsMeta CharactersCharacter Classes

Python Tutorial: re Module - How to Write and Match Regular Expressions (Regex)

Corey Schafer · 3 min read

Regular expressions in Python become practical once you learn how to (1) pass patterns safely into `re`, (2) interpret matches via spans and groups,...

Regular ExpressionsPython re ModuleRegex Meta-Characters

Python Tutorial: Web Scraping with BeautifulSoup and Requests

Corey Schafer · 2 min read

Web scraping becomes practical when HTML structure is treated like a map: fetch a page with `requests`, parse it with BeautifulSoup, then extract...

Web ScrapingBeautifulSoupRequests

Python Tutorial: Anaconda - Installation and Using Conda

Corey Schafer · 3 min read

Anaconda is pitched as a practical shortcut for getting a working Python data-science setup—complete with common libraries, environment management,...

Anaconda InstallationConda Package ManagerConda Environments

Setting up a Python Development Environment in Sublime Text

Corey Schafer · 2 min read

Setting up a Python workflow in Sublime Text hinges on three layers: installing Package Control, applying editor-wide preferences (themes, fonts, and...

Sublime Text SetupPython Build SystemsPackage Control

Python OOP Tutorial 6: Property Decorators - Getters, Setters, and Deleters

Corey Schafer · 2 min read

Property decorators in Python let class attributes behave like computed fields—readable like normal attributes, while still backed by methods that...

Property DecoratorsGettersSetters

Python SQLite Tutorial: Complete Overview - Creating a Database, Table, and Running Queries

Corey Schafer · 2 min read

SQLite in Python can be set up with almost no infrastructure: import the built-in `sqlite3` module, connect to a disk-backed database file (or an...

SQLite BasicsDatabase ConnectionsSQL Table Creation

Python Tutorial for Beginners 7: Loops and Iterations - For/While Loops

Corey Schafer · 2 min read

Loops and iterations in Python come down to two core tools: for loops that step through values, and while loops that keep running until a condition...

For LoopsWhile LoopsBreak and Continue

Python Tutorial: Decorators - Dynamically Alter The Functionality Of Your Functions

Corey Schafer · 2 min read

Python decorators let developers change or extend a function’s behavior without rewriting the function itself. The core idea is that a decorator is a...

Python DecoratorsFirst-Class FunctionsClosures

Preparing for a Python Interview: 10 Things You Should Know

Corey Schafer · 3 min read

Core takeaway: entry-level Python interview preparation hinges less on memorizing trivia and more on being able to write correct Python from scratch...

Whiteboard CodingControl FlowPython Data Types

Python Tutorial for Beginners 9: Import Modules and Exploring The Standard Library

Corey Schafer · 3 min read

Importing Python modules hinges on two practical choices: how to reference code you wrote (or third-party code) and how to pull in built-in tools...

Module Importssys.pathPYTHONPATH

Python Tutorial for Beginners 3: Integers and Floats - Working with Numeric Data

Corey Schafer · 2 min read

Python’s numeric toolbox hinges on two core types—integers and floats—and the practical rules for operating on them. Integers represent whole numbers...

Integers vs FloatsArithmetic OperatorsModulo and Parity

Python OOP Tutorial 5: Special (Magic/Dunder) Methods

Corey Schafer · 2 min read

Python’s “special” (magic/dunder) methods let custom classes behave like built-in types—changing how operations work and how objects display. Instead...

Dunder MethodsOperator Overloading__repr__ vs __str__

Python Threading Tutorial: Run Code Concurrently Using the Threading Module

Corey Schafer · 2 min read

Threading in Python delivers real speedups when tasks spend most of their time waiting on input/output—like network requests—because threads overlap...

Threading vs MultiprocessingI/O Bound ConcurrencyThreadPoolExecutor

Python Tutorial: Using Try/Except Blocks for Error Handling

Corey Schafer · 2 min read

Python’s try/except structure lets developers replace ugly, user-facing tracebacks with controlled, readable error handling—while still catching only...

Try/Except Error HandlingFileNotFoundErrorelse Clause

Python Flask Tutorial: Full-Featured Web App Part 3 - Forms and User Input

Corey Schafer · 2 min read

Flask forms don’t have to be hand-built and fragile: WT Forms lets developers define registration and login inputs as Python classes, attach...

WT FormsFlask-WTFForm Validation

Python Tutorial for Beginners 6: Conditionals and Booleans - If, Else, and Elif Statements

Corey Schafer · 2 min read

Python conditionals let programs choose which blocks of code run based on whether expressions evaluate to True or False—an idea built on Python’s...

If StatementsElse and ElifBoolean Operators

Python Pandas Tutorial (Part 2): DataFrame and Series Basics - Selecting Rows and Columns

Corey Schafer · 3 min read

Pandas’ core data structures—DataFrame (2D) and Series (1D)—become much easier to work with once they’re treated like rows/columns containers rather...

DataFrame BasicsSeries BasicsColumn Selection

Visual Studio Code (Windows) - Setting up a Python Development Environment and Complete Overview

Corey Schafer · 3 min read

Visual Studio Code becomes a full Python workstation on Windows by pairing the built-in editor with the Python extension, then wiring it to the right...

Visual Studio Code SetupPython InterpreterVirtual Environments

Python Flask Tutorial: Full-Featured Web App Part 4 - Database with Flask-SQLAlchemy

Corey Schafer · 2 min read

Flask-SQLAlchemy turns a Flask app’s database into Python classes—letting developers create real users and posts backed by SQLite in development,...

Flask-SQLAlchemy SetupSQLAlchemy ModelsOne-to-Many Relationships

Setting up a Python Development Environment in Atom

Corey Schafer · 2 min read

Atom is positioned as a free, GitHub-backed editor that can be turned into a practical Python workspace with a handful of packages—most importantly...

Atom SetupPython RunningCode Formatting

Python Django Tutorial: Full-Featured Web App Part 6 - User Registration

Corey Schafer · 2 min read

A complete Django user registration flow is built end-to-end: a dedicated “users” app, a register route and view, a template with CSRF protection,...

Django Users AppUser Registration ViewForm Validation

Python Tutorial: VENV (Windows) - How to Use Virtual Environments with the Built-In venv Module

Corey Schafer · 2 min read

Virtual environments solve a practical dependency problem: they let each project install its own Python packages without risking version conflicts in...

Virtual EnvironmentsPython venvWindows Activation

Python Tutorial: Datetime Module - How to work with Dates, Times, Timedeltas, and Timezones

Corey Schafer · 3 min read

Python’s datetime module is the backbone for working with dates, times, time deltas, and time zones—but the biggest practical hurdle is knowing when...

Naive vs Aware DatetimesTimedelta ArithmeticTime Zone Conversion with pytz

Python Tutorial: Logging Basics - Logging to Files, Setting Levels, and Formatting

Corey Schafer · 2 min read

Python’s built-in logging module is presented as a practical upgrade from print statements: it lets developers capture what happened (including...

Logging Levelslogging.basicConfigFile Logging

Python Tutorial: Slicing Lists and Strings

Corey Schafer · 2 min read

Python slicing lets you extract parts of lists and strings using a compact syntax: start, end, and optional step (start:end:step). The core rule is...

List SlicingString SlicingNegative Indexing

Python Pandas Tutorial (Part 8): Grouping and Aggregating - Analyzing and Exploring Your Data

Corey Schafer · 3 min read

Grouping and aggregation in pandas turns a raw survey table into answers—like “What’s the median salary by country?” or “Which social networks are...

AggregationGroupbyValue Counts

Python Pandas Tutorial (Part 5): Updating Rows and Columns - Modifying Data Within DataFrames

Corey Schafer · 2 min read

Updating existing data in pandas DataFrames hinges on using the right indexing and transformation tools—especially to avoid the “SettingWithCopy”...

Updating ColumnsUpdating RowsPandas Indexing

Python Tutorial: Automate Parsing and Renaming of Multiple Files

Corey Schafer · 2 min read

A practical Python script can fix messy, alphabetically sorted video filenames by renaming hundreds of files so they play in the intended numeric...

File RenamingPython ScriptingString Parsing

Python Tutorial: Iterators and Iterables - What Are They and How Do They Work?

Corey Schafer · 2 min read

Iterables and iterators in Python boil down to two distinct contracts: an iterable can produce an iterator via its `__iter__` method, while an...

IterablesIteratorsPython Protocols

Programming Terms: Closures - How to Use Them and Why They Are Useful

Corey Schafer · 1 min read

Closures let an inner function keep access to variables from the scope where it was created—even after that outer scope has finished running. That...

ClosuresFirst-Class FunctionsPython

Python Tutorial: Variable Scope - Understanding the LEGB rule and global/nonlocal statements

Corey Schafer · 2 min read

Python variable scope hinges on where a name is defined and the order Python searches when code references that name. The practical takeaway is the...

Variable ScopeLEGB RuleGlobal Keyword

Git Tutorial: Fixing Common Mistakes and Undoing Bad Commits

Corey Schafer · 2 min read

Undoing mistakes in Git comes down to choosing the right tool for the kind of error—and whether anyone else has already pulled the changes. The most...

Undoing Local ChangesAmending CommitsReset Modes

Linux/Mac Terminal Tutorial: The Grep Command - Search Files and Directories for Patterns of Text

Corey Schafer · 2 min read

Grep is a fast way to search for text patterns across files and directories from the Linux or Mac terminal, and mastering its options turns a simple...

Grep CommandText SearchRegular Expressions

Python Pandas Tutorial (Part 10): Working with Dates and Time Series Data

Corey Schafer · 2 min read

Working with date and time data in pandas starts with one non-negotiable step: converting your timestamp column from plain text into a real datetime...

Datetime ParsingTime Series FilteringResampling

Python Tutorial: Logging Advanced - Loggers, Handlers, and Formatters

Corey Schafer · 2 min read

Python’s logging becomes reliable only when each module uses its own logger and explicitly wires that logger to the right outputs. The core fix in...

Python LoggingLoggersHandlers

Linux/Mac Tutorial: SSH Key-Based Authentication - How to SSH Without a Password

Corey Schafer · 2 min read

SSH key-based authentication replaces password prompts with cryptographic login, making remote access both more convenient and more secure. The core...

SSH Key Authenticationssh-keygenauthorized_keys

How to Use ChatGPT as a Powerful Tool for Programming

Corey Schafer · 3 min read

ChatGPT can function as a practical programming copilot: it can generate working code from plain-English prompts, improve existing code, and...

Using ChatGPT for ProgrammingPython Code GenerationPassword Hashing

Programming Terms: First-Class Functions

Corey Schafer · 2 min read

First-class functions let programmers treat functions like ordinary values—assigning them to variables, passing them into other functions, and...

First-Class FunctionsHigher-Order FunctionsMap Transformation

5 Common Python Mistakes and How to Fix Them

Corey Schafer · 3 min read

Python’s most common “mystery errors” often come down to a handful of avoidable habits: inconsistent indentation, naming conflicts, mutable defaults,...

Indentation ErrorsImport ShadowingMutable Default Arguments

Customizing Your Terminal: .bash_profile and .bashrc files

Corey Schafer · 2 min read

Custom terminal settings only “stick” when they’re placed in the right startup files—specifically the dotfiles in a user’s home directory:...

Bash Startup Files.bash_profile vs .bashrcTerminal Prompt Customization

Python Tutorial: Pipenv - Easily Manage Packages and Virtual Environments

Corey Schafer · 3 min read

pipenv is positioned as a single, Python-ecosystem tool that unifies package management and virtual environments—reducing the friction of setting up...

PipenvVirtual EnvironmentsDependency Locking

Python Tutorial: UV - A Faster, All-in-One Package Manager to Replace Pip and Venv

Corey Schafer · 3 min read

UV is positioned as a single, faster replacement for several core Python workflow tools—installing packages, creating and managing virtual...

UV Package ManagerVirtual EnvironmentsDependency Lockfiles

Python Tutorial: Itertools Module - Iterator Functions for Efficient Looping

Corey Schafer · 3 min read

Itertools is a set of Python standard-library tools built for working with iterators—sequential data you can consume one item at a time without...

Itertools ModuleInfinite IteratorsCombinatorics

Python Quick Tip: F-Strings - How to Use Them and Advanced String Formatting

Corey Schafer · 2 min read

F-strings have become the go-to way to format strings in Python 3.6+ because they make interpolation more readable and more powerful than older...

F-StringsString FormattingDictionary Interpolation

Homebrew Tutorial: Simplify Software Installation on Mac Using This Package Manager

Corey Schafer · 3 min read

Homebrew turns macOS software installation into a fast, command-line workflow—installing both developer tools and full macOS apps with consistent...

Homebrew InstallationPackage SearchFormulas vs Casks

Understanding Binary, Hexadecimal, Decimal (Base-10), and more

Corey Schafer · 2 min read

Binary and hexadecimal become much easier once they’re treated as “base systems” built on the same positional idea as everyday base-10 numbers. In...

Positional Number SystemsBinary ConversionHexadecimal Digits

Python Flask Tutorial: Full-Featured Web App Part 11 - Blueprints and Configuration

Corey Schafer · 2 min read

Core finding: splitting a growing Flask app into Blueprints and moving configuration into a dedicated config object enables a more modular...

Flask BlueprintsBlueprint RoutingFlask Configuration

Python Tutorial: How to Set the Path and Switch Between Different Versions/Executables (Mac & Linux)

Corey Schafer · 3 min read

Python version mix-ups on Mac and Linux usually come down to one thing: the command line is pointing at the wrong Python executable. When “python”...

Python PATHSwitching Python VersionsBash Profile

Python Quick Tip: Hiding Passwords and Secret Keys in Environment Variables (Windows)

Corey Schafer · 2 min read

Hardcoding passwords and secret API keys directly in Python code is a common beginner mistake—and it becomes dangerous fast when code is shared with...

Environment VariablesPython SecurityWindows Setup

Python Flask Tutorial: Full-Featured Web App Part 9 - Pagination

Corey Schafer · 2 min read

Pagination becomes the centerpiece of the app’s next upgrade: instead of loading every post at once, the home feed switches to Flask-SQLAlchemy’s...

PaginationFlask-SQLAlchemyTemplate Iteration

Python Quick Tip: Hiding Passwords and Secret Keys in Environment Variables (Mac & Linux)

Corey Schafer · 2 min read

Hard-coding passwords and API keys directly in Python scripts is a common beginner mistake—especially when code is shared with a team or pushed to a...

Environment VariablesPython OS ModuleSecret Management

Python Tutorial: Write a Script to Monitor a Website, Send Alert Emails, and Reboot Servers

Corey Schafer · 2 min read

A practical Python watchdog can keep a personal website online by checking for failures, emailing an alert, and automatically rebooting the hosting...

Website MonitoringPython ScriptingSMTP Email Alerts

Python Tkinter Tutorial (Part 1): Getting Started, Elements, Layouts, and Events

Corey Schafer · 3 min read

Tkinter’s core workflow—create a root window, add widgets, lay them out with a geometry manager, and wire user actions through callbacks and event...

Tkinter SetupGrid LayoutEvent Handling

Python Tutorial: str() vs repr()

Corey Schafer · 2 min read

Python’s `repr()` and `str()` both turn values into text, but they optimize for different goals: `str()` aims for readability, while `repr()` aims...

str vs reprPython String ConversionDebugging Output

Python Tutorial: Zip Files - Creating and Extracting Zip Archives

Corey Schafer · 2 min read

Python can create, compress, and extract ZIP archives using the standard library’s `zipfile` module, and it can also handle archive workflows...

Zipfile ModuleArchive CompressionContext Managers

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 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

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

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