Language: English · Español (README.es.md)
Zero-dependency Python ETL and alerting pipeline designed as a self-hosted alternative to fragile Zapier/Make chains for messy operational CSV feeds. Runs with Python's standard library (sqlite3, decimal, csv, urllib) on any small Linux VPS or Docker container.
- Idempotent SQLite WAL ledger: Computes a SHA-256 fingerprint (
external_id+ normalized fields) per row so re-processing the same export inserts zero duplicates. - Strict
Decimalmonetary parser: Normalizes mixed US ($1,250.50) and LATAM/EU (1.250,50) strings, rejects negative/zero/garbage values, and never usesfloat. - Quarantine instead of crashing the batch: Malformed rows (missing IDs, invalid dates, bad amounts) are routed to
quarantine.csvwith the exact error reason while valid rows continue processing. - Clean exports + retryable webhook alerts: Emits
clean_records.csv,summary.json, and an optional JSON webhook digest with exponential backoff retries.
Messy CSV Feed
│
▼
Parser & Decimal Guard ──▶ Invalid rows ──▶ quarantine.csv (with error reason)
│ Valid rows
▼
SQLite WAL Ledger ───────▶ Seen SHA-256 ──▶ Skipped (0 duplicates)
│ New records
▼
Export & Digest ─────────▶ clean_records.csv + summary.json + Webhook Alert
# 1. Run against messy sample data (add --webhook-url https://... for JSON alerts)
PYTHONPATH=src python -m ops_pipeline.cli \
--input examples/sample_orders_messy.csv \
--out-dir ./output \
--db ./output/state.db
# 2. Re-run the exact same file to verify idempotency (0 new inserts)
PYTHONPATH=src python -m ops_pipeline.cli \
--input examples/sample_orders_messy.csv \
--out-dir ./output \
--db ./output/state.db
# 3. Run the automated test suite (stdlib unittest, zero external deps)
PYTHONPATH=src python -m unittest discover -s tests -v# First run
[OpsPipeline] Run complete for 'sample_orders_messy.csv'
- Total rows read: 9
- New records ingested: 4
- Duplicates skipped: 1
- Quarantined rows: 4
- New volume: 1480.75 EUR, 1640.50 USD, 825.25 USDT
# Second run on the same file (idempotent)
[OpsPipeline] Run complete for 'sample_orders_messy.csv'
- Total rows read: 9
- New records ingested: 0
- Duplicates skipped: 5
- Quarantined rows: 4
- New volume: 0.00
docker build -t ops-automation-pipeline .
docker run --rm -v "$(pwd)/output:/app/output" ops-automation-pipelineBuilt by Víctor Yohan Betancourt Marín — quanticosystems.com.
Released under the MIT License.