← Back to all products

Inventory Management System

$49

Real-time inventory tracking with low-stock alerts, reorder automation, multi-warehouse support, and CSV/API sync.

📁 22 files
MarkdownYAMLPythonSQL

📄 Product Preview

Try the interactive reader and demo tools below, or get the full product with all content unlocked.

📖 Interactive Reader (Free Preview) ⚙ Try Demo Tools 📦 Download Free Sample

📁 File Structure 22 files

inventory-management-system/ ├── LICENSE ├── README.md ├── configs/ │ └── inventory_config.yaml ├── data/ │ ├── sample_products.csv │ └── sample_stock.csv ├── free-sample.zip ├── guide/ │ ├── 01-overview.md │ ├── 02-real-time-inventory-tracking.md │ └── 03-reorder-automation-and-multi-warehouse-s.md ├── guides/ │ └── setup_guide.md ├── index.html ├── scripts/ │ └── run_inventory.py ├── sql/ │ └── schema.sql ├── src/ │ ├── __init__.py │ ├── alerts.py │ ├── csv_sync.py │ ├── models.py │ ├── reorder.py │ ├── sync_adapter.py │ ├── tracker.py │ └── warehouse.py └── tests/ └── test_inventory.py

📖 Documentation Preview README excerpt

Inventory Management System

Complete Python toolkit for real-time inventory tracking across multiple warehouses, with automated low-stock alerts, reorder point / EOQ calculations, and CSV/API synchronization.

What's Included

  • Stock Tracker — Central coordinator that maintains stock levels and records every movement with a full audit trail
  • Low-Stock Alerts — Configurable alert system with WARNING, CRITICAL, and STOCKOUT levels, cooldown periods, and pluggable handlers
  • Reorder Engine — Automated reorder-point and Economic Order Quantity (EOQ) calculations with purchase order generation
  • Multi-Warehouse Allocation — Three allocation strategies (priority, nearest, balanced) for deciding which warehouse fulfills each order
  • CSV Import/Export — Bulk data operations with flexible column mapping (handles different CSV formats from various systems)
  • Sync Adapter Interface — Abstract adapter pattern for connecting to external systems (Shopify, WooCommerce, ERPs, etc.)
  • SQLite Schema — Ready-to-use database schema with indexed tables and reporting views

Quick Start


# Run the complete demo
python scripts/run_inventory.py

from src.tracker import InventoryTracker
from src.alerts import AlertManager, log_alert_handler
from src.models import Product

# Set up tracking with alerts
tracker = InventoryTracker(db_path="data/inventory.db")
alert_mgr = AlertManager()
alert_mgr.add_handler(log_alert_handler)
tracker.add_observer(alert_mgr.on_stock_change)

# Register products, record movements, check levels
tracker.register_product(Product(sku="SKU-001", name="Widget", unit_cost=10.0, unit_price=29.99))
tracker.record_purchase("SKU-001", "WH-EAST-01", 200, po_number="PO-1234")
tracker.record_sale("SKU-001", "WH-EAST-01", 5, order_id="ORD-5678")

level = tracker.get_stock_level("SKU-001", "WH-EAST-01")
print(f"Available: {level.quantity_available} | Status: {level.status.value}")

Contents


├── src/                    — Core Python package (7 modules)
│   ├── models.py           — Product, Warehouse, StockLevel, StockMovement, PurchaseOrder
│   ├── tracker.py          — InventoryTracker with movement recording and observer pattern
│   ├── alerts.py           — AlertManager with configurable thresholds and handlers
│   ├── reorder.py          — ReorderEngine with ROP, EOQ, and PO generation
│   ├── warehouse.py        — WarehouseManager with allocation strategies
│   ├── csv_sync.py         — CSVImporter and CSVExporter with flexible column mapping
│   └── sync_adapter.py     — SyncAdapter ABC, InMemoryAdapter, RESTAdapter template
├── sql/schema.sql          — SQLite schema with indexes and reporting views
├── configs/                — Annotated YAML configuration
├── data/                   — Sample CSVs (15 products, 19 stock level records)
├── scripts/                — Runnable demo script
├── tests/                  — Unit tests (20+ test cases)
└── guides/                 — Detailed setup and usage guide

... continues with setup instructions, usage examples, and more.

📄 Code Sample .py preview

scripts/run_inventory.py#!/usr/bin/env python3 """ Example Script — Inventory Management System ============================================== Demonstrates the complete workflow: registering products and warehouses, recording movements, checking stock levels, generating alerts, and running the reorder engine. Run from the product root directory: python scripts/run_inventory.py """ from __future__ import annotations import logging import sys from pathlib import Path # Add the product root to the path so imports work when run as a script sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) from src.models import MovementType, Product, StockMovement, Warehouse from src.tracker import InventoryTracker from src.alerts import AlertManager, AlertLevel, log_alert_handler from src.reorder import ReorderEngine from src.warehouse import WarehouseManager from src.csv_sync import CSVImporter, CSVExporter # Configure logging so we can see what the system is doing logging.basicConfig( level=logging.INFO, format="%(asctime)s [%(levelname)s] %(name)s: %(message)s", datefmt="%H:%M:%S", ) logger = logging.getLogger("inventory_demo") def main() -> None: """Run the full inventory management demo."""
Buy Now — $49 Back to Products