A neighborhood bike shop was losing half a day every week to manual inventory checks. One Python script now watches the shelves every morning instead.
Summit Cycle (a fictional client) stocks over 400 SKUs across bikes, parts, and accessories. Every Monday, a staff member opened the inventory spreadsheet and eyeballed every row for low stock.
It took three hours, it was always out of date by Wednesday, and stockouts were usually discovered when a customer asked for something that was not there.
A single Python script runs every morning at 7am. It reads the shop's inventory CSV export, compares each SKU against its reorder point, and emails a short low-stock list to the owner.
No more Monday counts. No more guessing. The owner opens one email with coffee and knows exactly what to order.
Read. The script opens the inventory CSV the point-of-sale system exports nightly. No new software for the staff to learn.
Compare. Each SKU is checked against its reorder point from a small thresholds file the owner can edit in plain text.
Alert. Anything at or below its reorder point goes into a short email with suggested order quantities. Nothing low, no email.
The whole thing fits in one file and uses only Python's built-in libraries, so there is nothing to install and nothing that breaks on update day.
# stock_watch.py, reads inventory.csv, emails low-stock alerts import csv, smtplib from email.message import EmailMessage THRESHOLDS = {"PAD-ROAD-M": (20, 5), # sku: (reorder_qty, alert_at) "CHAIN-11": (12, 4), "GRIP-LOCK": (10, 3)} low = [] with open("inventory.csv") as f: for row in csv.DictReader(f): sku, qty = row["sku"], int(row["qty"]) if sku in THRESHOLDS: reorder, alert_at = THRESHOLDS[sku] if qty <= alert_at: low.append((sku, qty, reorder)) if low: msg = EmailMessage() msg["Subject"] = f"Low stock alert ({len(low)} items)" msg["From"] = "[email protected]" msg["To"] = "[email protected]" msg.set_content("\n".join( f"{s}: {q} left, reorder {r}" for s, q, r in low)) smtplib.SMTP("localhost").send_message(msg) print(f"Sent alert for {len(low)} SKUs.") else: print("All stocked up.")
Stockouts dropped 70% in the first 60 days, because reorders now happen the morning stock runs low instead of the Monday after. The three hours of manual counting went back to serving customers.
Total build time: one afternoon. Total maintenance since: none.
If a repetitive check is eating your week, a small script can probably kill it. This is a demo case study for a fictional client.
LET'S AUTOMATE IT