Build Your Own Tariff Change Radar in ~70 Lines of Python
Description and use
Build a tariff change radar with ~70 lines of Python that watches an open GitHub repo and pings a webhook when new changes occur.
Problem
Tariff changes occur frequently and need timely notification for import pricing decisions.
Outcome
The radar runs from cron, watches an open dataset, and pings a webhook when the tariff stack moves, avoiding scraping and API keys.
Workflow
- Clone or pull the invoicetariff/invoicetariff repo
- Load data/changelog.json and ruleset‑seed.json
- Compare entry IDs against stored state file
- If new entries exist, send a webhook payload
- Update state file with new IDs
Evidence
Tariff rates don't sneak up on anyone — tariff changes do.
The raw sources are hostile to automation. Federal Register notices are prose; exclusion lists ship as PDF attachments; CBP publishes CSMS messages on a page that assumes a human is reading it.
Three properties make this watchable: Git is the transport; status splits the timeline; the repo ships the ruleset itself.
- Record date: 2026-10-18T16:11:09.396Z