#Automation
7 posts
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.
Python Automation #4: Web Scraping Part 2 — Dynamic Pages with Playwright
Handle JavaScript-rendered pages that return empty HTML to requests by driving a real browser with Playwright. From install and a first script to wait_for_selector, login automation, infinite scroll, and saving to CSV — all in one pass.
Python Automation #3: Web Scraping Part 1 — Static Pages with httpx and BeautifulSoup
Let code read the price, notice, and stock pages you check by hand every day. We fetch HTML with httpx, pick out just the data we need with BeautifulSoup CSS selectors, and save it to CSV — static page scraping from start to finish.
Python Automation #2: Excel Automation — Ending Repetitive Reports with openpyxl
Read Excel files with openpyxl, merge per-branch reports from a folder into a single sheet, and finish with header styling and number formats. We also cover the formula and data_only pitfalls, merged cells, and large-file performance.
Python Automation #1: Ending Repetitive Work — First Scripts and File Organizing
Learn the basic shape of an automation script by building a downloads-folder organizer in Python. We sort and move files with pathlib, add a dry-run safety net, and wire up argparse arguments — one full cycle from start to finish.