Rock Solid Python with Type Hints and Tools Course

Rock Solid Python with Python Typing

Course Summary

When Python was originally invented way back in 1989, it was a truly dynamic and typeless programming language. But that all changed in Python 3.5 when type "hints" were added to the language. Over time, amazing frameworks took that idea and ran with it. They build powerful and type safe(er) frameworks. Some of these include Pydantic, FastAPI, Beanie, SQLModel, and many many more. In this course, you'll learn the ins-and-outs of Python typing in the language, explore some popular frameworks using types, and get some excellent advice and guidance for using types in your applications and libraries.

What students are saying

Just wrapped up your [course]. Fantastic! Enlightening! Instruction that's entertaining!!
-- Simon S.

Source code and course GitHub repository

github.com/talkpython/rock-solid-python-with-type-hints-course

What's this course about and how is it different?

This course dives deep into Python types. You will see many examples and graphics communicating the motivation for types and where they fit into the Python ecosystem. But you will also get very hands-on and learn all of these ideas with deep yet approachable code demos.

What topics are covered

In this course, you will:

  • Compare popular static languages with Python (such as Swift, C#, TypeScript, and others)
  • See a exact clone of a dynamic Python codebase along side the typed version
  • Learn how and when to create typed variables
  • Understand Python's strict nullability in its type system
  • Specify constant (unchangeable) variables and values
  • Reduce SQL injection attacks with LiteralString
  • Uses typing with Python functions and methods
  • Use typing with classes and class variables
  • Work with multiple numerical types with Python's numerical type ladder
  • Use Pydantic to model and parse complex data in a type strict manner
  • Create an API with FastAPI that exchanges data with type integrity
  • Query databases with Pydantic using the Beanie ODM
  • Create CLI apps using type information to define the CLI interface
  • Leverage mypy for verifying the integrity of your entire codebase in CI/CD
  • Add runtime type safety to your application
  • Marry duck typing and static typing with Python's new Protocol construct
  • Learn design patterns and guidance for using types in Python code
  • And lots more, see the full course outline.

Who is this course for?

This course is for anyone who knows basic Python and wants to take full advantage of Python type hints and related frameworks within their code. If you find you're not sure when or how to use Python type hints or feel that you could be leveraging them more, then this course is for you!

We do assume that you know core Python syntax and concepts such as virtual environments and external packages. If you are entirely new to Python, see our Python for Beginners course.

Concepts backed by concise visuals

While exploring a topic interactively with demos and live code is very engaging, it can mean losing the forest for the trees. That's why when we hit a new topic, we stop and discuss it with concise and clear visuals.

Here's an animated graphic we used while discussing the familiar yet very unique role that Protocol plays in Python's object-oriented programming constructs.

Example: Concepts backed by concise visuals

Get hands-on with almost every chapter

Learning a new language features and concepts is an interactive experience. That's why it's important to write code and explore the apps we are building during this course.

Every chapter that involves writing or reading code has a starter and finished code snapshot. We strongly encourage you to take the starter code from each chapter and build out the features you see created during the course for each chapter after you complete it.

This course is delivered in very high resolution

Example of 1440p high res video

This course is delivered in 1440p (4x the pixels as 720p). When you're watching the videos for this course, it will feel like you're sitting next to the instructor looking at their screen.

Every little detail, menu item, and icon is clear and crisp. Watch the introductory video at the top of this page to see an example.

Follow along with subtitles and transcripts

Each course comes with subtitles and full transcripts. The transcripts are available as a separate searchable page for each lecture. They also are available in course-wide search results to help you find just the right lecture.

Each course has subtitles available in the video player.

Who am I? Why should you take my course?

Who is Michael Kennedy?

My name is Michael, nice to meet you. ;) There are a couple of reasons I'm especially qualified to teach you Python.

 1. I'm the host of the #1 podcast on Python called Talk Python To Me. Over there, I've interviewed many of the leaders and creators in the Python community. I bring that perspective to all the courses I create.

 2. I've been a professional software trainer for over 10 years. I have taught literally thousands of professional developers in hundreds of courses throughout the world.

 3. Students have loved my courses. Here are just a few quotes from past students of mine.

"Michael is super knowledgeable, loves his craft, and he conveys it all well. I would highly recommend his training class anytime." - Robert F.
"Michael is simply an outstanding instructor." - Kevin R.
"Michael was an encyclopedia for the deep inner workings of Python. Very impressive." - Neal L.

The time to act is now

If this course is a good fit for you and your goals, you should jump right in. It goes deep but doesn't skip out too much the foundation background info. You'll start to see benefits for your code right away. And it comes with a 100% money back guarantee (see details), so it's 100% risk free as well.

Course Outline: Chapters and Lectures

Welcome to the Course
12:44
Welcome
1:34
Python Language Typing Definition
2:41
What We'll Cover
2:42
Goal: Not 100%
1:11
You'll Need Python 3.10 or Newer
1:07
git the Repo
1:22
Meet Your Instructor
1:37
PyCharm Pro for Free
0:30
Static vs. Dynamic Languages
42:24
Spectrum of Type Strictness
6:36
Running the Source Code
3:26
Motorcycle Class, Untyped
5:35
Using the Untyped Motorcycle
2:21
Duck Typing
3:03
TypeScript Motorcycles
4:40
C# Motorcycle and Why Types Can Detract from Readability
5:01
A Very Swift Motorcycle
4:04
Typed Python Motorcycles
7:38
Typing in Python
1:21:41
Python Typing Introduction
0:33
Where Do Python Type Hints Come From?
1:14
Typing and Variables
3:23
Survey of Core Types
3:05
Nullable Types
5:22
Unions
3:11
If You Don't Know the Type
2:03
Constants
3:37
Avoiding Injection Attacks with LiteralString
6:02
Functions: Basic Typing
5:12
Functions: void Functions
2:43
Functions: Functions as Objects
5:33
Typing for Container Data Types
7:21
More Complex Containers
8:28
Classes and Typing
6:26
Externally Defining Types
4:26
Adding Our Own Types
3:56
Representing Multiple Numerical Types
4:12
Generics Available in Python 3.12
1:44
Gradual Typing
3:10
Frameworks Built on Typing
43:27
Frameworks Introduciton
0:46
Pydantic Foundations
2:24
Pydantic Code Example
1:00
pip-tools for Adding Requirements
3:16
Parsing Basic Data with Pydantic
8:57
Data-Rich Pydantic Example
6:03
Web frameworks using Type Hints
4:57
Database Frameworks Built on Pydantic
3:40
CLIs with Python Types
2:08
Setting up Our FastAPI Example
3:43
FastAPI, Beanie, and Pydantic MongoDB Example
4:26
Setting up the DB to Run the Code Yourself
2:07
Tools Based on Typing
31:43
Tools Introduction
0:41
Editors (Round 2)
2:26
Full Project Inspection
6:11
Static Type Checkers
1:32
mypy in Action
5:14
Runtime Type Checking with Beartype
1:55
Getting Started with Beartype
6:43
Beartype Speed Test
7:01
Orthogonal Typing
16:59
Orthogonal/Structural Typing Introduction
1:06
Inheritance Gone Wrong, an Example
6:10
Static duck typing with Protocols
8:24
Structural Typing Visualized
1:19
Typing Guidance, Patterns, and Advice
33:32
Patterns Introduction
1:11
Types on the Boundary
2:05
Public Packages
1:30
Autocomplete
1:10
To Optional or Not
3:10
Versions of Python
4:18
Minimalism Overview
4:11
Minimalism Code
1:45
Refactoring Motivation
1:30
Refactoring with Types
2:37
Point of No Return
7:39
Collection Advice
2:26
Course Conclusion
5:05
Conclusion
5:05
Buy for $49 + tax Bundle and save 85% Team Gift

Questions? Send us an email: contact@talkpython.fm

Talk Python's Mastodon Michael Kennedy's Mastodon