#Python
157 posts
Python Data Analysis #2: Loading Data — CSV, Excel, and First Exploration
The encoding, sep, and dtype arguments of read_csv and the legacy-codepage trap, sheet selection in read_excel, and the routine of checking your data with head, info, and describe right after loading.
Python Data Analysis #1: Getting Started with pandas — Notebooks and the DataFrame
pandas is the Python library for working with tabular data. We set up a notebook environment with uv, build Series and DataFrame objects by hand, and kick off this seven-part data analysis series.
Python Automation #7: Building Your Own Command — Packaging a CLI with typer and rich
Closing out the series by bundling the automation scripts into a single CLI with typer, polishing the output with rich, and installing it with uv tool install as a command you can call from anywhere.
Python Automation #6: Scheduling — Making Scripts Run While You Sleep
How to make a finished automation script run on its own at a fixed time. We compare cron, launchd, Windows Task Scheduler, and APScheduler, keep run records with logging, get notified on failures, and cover GitHub Actions schedules.
Python Automation #5: Reporting Results — Email, Slack, and Discord Notifications
The last piece of automation is reporting. Send Slack and Discord notifications with a single httpx POST, email Excel attachments with smtplib, and keep tokens out of your code with a .env file.

Advanced typing — Variance, ParamSpec, Self, overload
The next step from intermediate typing — covariance/contravariance, ParamSpec and Concatenate, Self, TypeGuard/TypeIs, and @overload.

Appendix A — Moving old Python code to the modern style
A step-by-step guide for moving 2017-era Python code (% strings, has_key, type() comparison, etc.) to modern Python. So readers of the old 21-part Python basics tutorial can continue naturally into this book.

Async and background jobs
When to use async routes, BackgroundTasks for post-response work, the boundary where external queues (Celery, ARQ) start to be needed, and how to safely mix in sync libraries.

Async in depth — event loop, gather/wait, async generator
The next step from the intermediate intro — how the event loop actually works, the difference between Future and Task, gather vs wait, async generators and async iteration.

Asyncio intro
What async/await means, the event loop, asyncio.gather and TaskGroup, and mixing with sync code — your first steps into asyncio in one place.

Authentication — OAuth2 password flow + JWT
Password hashing (argon2/bcrypt), the OAuth2 password flow, JWT issuance/verification, and the current_user dependency that wraps it all into a clean auth pattern.

Building CLI tools (Typer)
How to build a type-hints-first CLI with Typer instead of argparse. Subcommands, autocompletion, and Rich-powered output.