A Lean, Declarative Excel Automation Engine for Modern Business
Transform fragmented Excel workflows into structured, versionable, and scalable assets. DataWeaver replaces fragile VBA macros with a high-density, parametric Rule Engine built on FastAPI, Pandas, and Celery.
English | Español
Standard automation projects often suffer from "Complexity Bloat". DataWeaver is built on Density Principles:
- Super-Skills: Instead of 50 different tools, we use parametric rules (e.g.,
aggregatehandles sum, mean, count, max, min). - Super-Params: Global parameters like
target_sheetallow any transformation to materialize results directly into named output sheets. - Lean Architecture: Modular, SOLID-compliant Rule Engine and consolidated API layer for maximum developer velocity.
graph TD
UI[React / REST Client] -->|REST API| API[FastAPI Gateway]
API --> DB[(PostgreSQL Metadata)]
API -->|Dispatch Task| Redis[(Redis Broker)]
Redis -->|Consume| Worker[The Weaver: Celery Worker]
Worker -->|Execute| Logic[Modular Rule Engine]
Logic -->|Async IO| Files[Excel Storage Volume]
| Layer | Path | Responsibility |
|---|---|---|
| Core | app/core/ |
Auth, DB, Models & Schemas (The Backbone) |
| Rules Engine | app/engine/rules/ |
Modular Rules (filter, aggregate, move) & Factory |
| Orchestrator | app/engine/engine.py |
Context Management & Step Execution |
| Gateway | app/api/ |
Non-blocking REST Endpoints & Routers |
| Workers | app/tasks/ |
Async Celery Tasks with Fault-Tolerant Retry Logic |
| Migrations | alembic/ |
Database Schema Migrations (Alembic) |
git clone https://github.com/Medalcode/DataWeaver.git
cd DataWeaver
cp .env.example .env
docker-compose up -dServices include health checks, automatic database migrations, and shared storage volume between API and Celery workers.
# 1. Install Dependencies
pip install -r requirements.txt
cp .env.example .env
# 2. Start Infrastructure
docker-compose up -d postgres redis
# 3. Run Database Migrations
alembic upgrade head
# 4. Start API & Workers
uvicorn app.main:app --reload
celery -A app.tasks.celery_app worker --loglevel=info
celery -A app.tasks.celery_app beat --loglevel=infoDataWeaver uses Declarative Steps. Every step can materialize its result by simply adding the target_sheet parameter.
Filters the current working dataset.
- Params:
column,operator,value(=,!=,>,<,>=,<=,contains) - Materialization:
target_sheet(Optional)
Powerful data summarization.
- Params:
group_by,field,op(sum,mean,count,max,min) - Required:
target_sheet
Simple materialization wrapper for the current working dataset.
We maintain a 100% passing automated test suite (24 tests covering Engine, Auth, API, Tasks, and Validation).
# Set PYTHONPATH and run full test suite
$env:PYTHONPATH = "backend"
python -m pytest tests/ -vCI automatically runs pytest across Python 3.10, 3.11, 3.12 and validates Docker build reproducibility on every push.
Before adding a new file, ask: "Can this be a parameter in an existing skill?"
- Fork the repo.
- Build your feature in
app/engine/rules/. - Add unit tests in
tests/. - Submit your PR.
Built with ❤️ for scalable Excel automation.