Mathew K Analytics

Python standard library deep dive

A free 24-lesson course. Every lesson has a video walkthrough and a Jupyter notebook you can download or open in Google Colab; 3 lessons include real datasets. Tools covered: datetime, JSON, pathlib, collections, CSV, logging.

About this course

Python's standard library ships with every installation, and knowing it saves you from reinventing tools or installing packages you don't need. This deep dive covers 24 modules, one per lesson: files and paths (os, sys, pathlib, shutil, glob, tempfile), dates, collections, itertools and functools, regular expressions, JSON and CSV, math and random, subprocess, asyncio, logging, argparse, pickle, hashing and secrets, context managers, dataclasses, typing and enum, unittest, text tools and encodings. The final lesson builds a complete command-line tool from these pieces.

Python standard library deep dive is a free intermediate course with 24 video lessons (about 7 hours of video in total). It starts with “Python os & sys Explained: Files, Env Vars & Args | Standard Library #1” and finishes with “Build a Python CLI Tool from Scratch | Standard Library Capstone #25”. Every lesson comes with the exact Jupyter notebook used in the video, and 3 of them include the dataset, so you can follow along with the same data.

Along the way you'll use datetime, JSON, pathlib, collections, CSV and logging.

It suits learners who know basic Python and want to write cleaner, more professional scripts.

What you'll be able to do

  • Work with files, folders and paths safely across operating systems
  • Use collections, itertools and functools to write shorter, faster code
  • Parse text with regular expressions and read and write JSON and CSV
  • Run external commands, write async code and add proper logging
  • Build command-line tools with argparse
  • Use dataclasses, type hints and enums to make code easier to maintain
  • Write unit tests with unittest

All 24 lessons

Python os & sys Explained: Files, Env Vars & Args | Standard Library #120 min
Lesson 1

Python os & sys Explained: Files, Env Vars & Args | Standard Library #1

📓 Notebook

Python pathlib Explained: Modern File Paths Made Easy | Standard Library #220 min
Lesson 2

Python pathlib Explained: Modern File Paths Made Easy | Standard Library #2

📓 Notebook · pathlib

Python datetime Explained: Dates, Times & Time Zones | Standard Library #320 min
Lesson 3

Python datetime Explained: Dates, Times & Time Zones | Standard Library #3

📓 Notebook · datetime

Python collections Explained: Counter, deque & defaultdict | Standard Library #417 min
Lesson 4

Python collections Explained: Counter, deque & defaultdict | Standard Library #4

📓 Notebook · collections

Python itertools Explained: Iterators, Combinations & More | Standard Library #514 min
Lesson 5

Python itertools Explained: Iterators, Combinations & More | Standard Library #5

📓 Notebook · itertools

Python functools Explained: lru_cache, partial & wraps | Standard Library #618 min
Lesson 6

Python functools Explained: lru_cache, partial & wraps | Standard Library #6

📓 Notebook · functools

Python re Explained: Regular Expressions Made Simple | Standard Library #718 min
Lesson 7

Python re Explained: Regular Expressions Made Simple | Standard Library #7

📓 Notebook · regex (re)

Python json & csv Explained: Read and Write Data Files | Standard Library #818 min
Lesson 8

Python json & csv Explained: Read and Write Data Files | Standard Library #8

📓 Notebook · JSON · CSV · datetime

Python math, random & statistics Explained | Standard Library #920 min
Lesson 9

Python math, random & statistics Explained | Standard Library #9

📓 Notebook

Python subprocess Explained: Run External Commands Safely | Standard Library #1016 min
Lesson 10

Python subprocess Explained: Run External Commands Safely | Standard Library #10

📓 Notebook · subprocess

Python asyncio Explained: async/await & Event Loops | Standard Library #1217 min
Lesson 12

Python asyncio Explained: async/await & Event Loops | Standard Library #12

📓 Notebook · asyncio

Python logging Explained: Loggers, Handlers & Formatters | Standard Library #1315 min
Lesson 13

Python logging Explained: Loggers, Handlers & Formatters | Standard Library #13

📓 Notebook · logging

Python argparse Explained: Build Real CLI Tools | Standard Library #1416 min
Lesson 14

Python argparse Explained: Build Real CLI Tools | Standard Library #14

📊 Dataset · 📓 Notebook · argparse

Python pickle & shelve Explained: Save Objects to Disk | Standard Library #1516 min
Lesson 15

Python pickle & shelve Explained: Save Objects to Disk | Standard Library #15

📓 Notebook · pickle

Python hashlib, hmac & secrets Explained: Secure Your Code | Standard Library #1617 min
Lesson 16

Python hashlib, hmac & secrets Explained: Secure Your Code | Standard Library #16

📓 Notebook

Python contextlib Explained: Custom Context Managers | Standard Library #1717 min
Lesson 17

Python contextlib Explained: Custom Context Managers | Standard Library #17

📓 Notebook

Python dataclasses Explained: Cleaner Classes, Less Code | Standard Library #1818 min
Lesson 18

Python dataclasses Explained: Cleaner Classes, Less Code | Standard Library #18

📓 Notebook · dataclasses

Python typing & enum Explained: Type Hints Done Right | Standard Library #1918 min
Lesson 19

Python typing & enum Explained: Type Hints Done Right | Standard Library #19

📓 Notebook

Python unittest Explained: Write Tests That Catch Bugs | Standard Library #2018 min
Lesson 20

Python unittest Explained: Write Tests That Catch Bugs | Standard Library #20

📓 Notebook · unittest

Python shutil, tempfile & glob Explained: File Operations | Standard Library #2117 min
Lesson 21

Python shutil, tempfile & glob Explained: File Operations | Standard Library #21

📊 Dataset · 📓 Notebook

Python io, string & textwrap Explained: Text & Streams | Standard Library #2216 min
Lesson 22

Python io, string & textwrap Explained: Text & Streams | Standard Library #22

📓 Notebook

Python uuid, base64 & binascii Explained: Encode Anything | Standard Library #2317 min
Lesson 23

Python uuid, base64 & binascii Explained: Encode Anything | Standard Library #23

📓 Notebook · JSON

Python abc & inspect Explained: Abstract Classes & Introspection | Standard Library #2418 min
Lesson 24

Python abc & inspect Explained: Abstract Classes & Introspection | Standard Library #24

📓 Notebook

Build a Python CLI Tool from Scratch | Standard Library Capstone #2518 min
Lesson 25

Build a Python CLI Tool from Scratch | Standard Library Capstone #25

📊 Dataset · 📓 Notebook · argparse · dataclasses · pathlib

Frequently asked questions

Is the Python standard library deep dive course free?

Yes. All 24 videos, notebooks and datasets are free, with no sign-up.

Do I need to install anything?

No. You can open each notebook in Google Colab in your browser, or download it and run it in Jupyter or VS Code with Anaconda installed.

How long does the Python standard library deep dive course take?

The videos add up to about 7 hours. Most learners take one to two lessons a day, so plan on 3 to 6 weeks if you code along.

What level is it?

Intermediate. It suits learners who know basic Python and want to write cleaner, more professional scripts.