Engineering-First ML Library for building robust, production-grade machine learning pipelines
Project description
ForgeFlow
Production-grade ML library for building reliable, type-safe machine learning pipelines.
ForgeFlow is designed for engineering teams who need robust data validation, reproducible feature engineering, and production-ready ML infrastructure. Built with strict type safety, immutability, and defensive programming principles.
Why ForgeFlow?
Modern ML systems fail in production due to data quality issues, schema drift, and unreliable pipelines. ForgeFlow addresses these challenges with:
- Strict Schema Validation - Pydantic-based contracts that fail fast on invalid data
- Immutable Operations - Pure functions that prevent side effects and ensure reproducibility
- Quality Gates - Automated checks that prevent bad data from reaching production
- Drift Detection - Statistical monitoring to catch distribution shifts early
- Type Safety - 100% type-hinted codebase for better IDE support and fewer runtime errors
Installation
pip install forge-flow
Optional dependencies:
pip install forge-flow[serving] # Redis-based feature store
pip install forge-flow[database] # SQL database connectors
pip install forge-flow[all] # Everything
Quick Start
ForgeFlow follows a simple pipeline pattern: Ingest → Validate → Transform → Serve
1. Define Your Schema
Schemas enforce data contracts and catch issues early:
from forge_flow.schemas import StrictSchema
from pydantic import Field
class Transaction(StrictSchema):
user_id: int = Field(gt=0)
amount: float = Field(gt=0, le=1000000)
timestamp: datetime
2. Validate Data
Automatic validation with Dead Letter Queue for invalid records:
from forge_flow.schemas import SchemaValidator
validator = SchemaValidator(Transaction)
clean_data = validator.validate(raw_data, raise_on_error=False)
3. Engineer Features
Immutable transformations with built-in quality checks:
from forge_flow.features import DataCleaner, FeatureEngineer
cleaner = DataCleaner()
cleaned = cleaner.handle_nulls(clean_data)
engineer = FeatureEngineer()
features = engineer.add_rolling_features(
cleaned,
group_col='user_id',
value_col='amount',
windows=[7, 30]
)
4. Quality Gates
Prevent bad data from reaching production:
from forge_flow.features import QualityGate
gate = QualityGate(max_null_rate=0.05, min_rows=1000)
gate.validate(features) # Raises error if quality fails
Core Features
Data Ingestion
- File Connectors - Read from local, S3, GCS, Azure (Parquet, CSV, JSON)
- API Connectors - Resilient HTTP clients with retries and rate limiting
- Database Connectors - SQLAlchemy-based with incremental loading
Feature Engineering
- Data Cleaning - Null handling, outlier detection, type casting
- Transformations - Rolling windows, lag features, encoding, normalization
- Pipelines - Reproducible workflows with Pydantic configuration
Production Features
- Online Store - Redis-based sub-millisecond feature serving
- Drift Detection - KS test for numeric, PSI for categorical features
- Structured Logging - Full observability with structlog
Design Principles
ForgeFlow is built for production systems, not notebooks:
- Fail Fast - Validate early, catch errors at ingestion boundaries
- Immutability - Operations return new objects, preventing side effects
- Type Safety - Comprehensive type hints for better tooling and fewer bugs
- Explicit Over Implicit - No magic, clear data flows
- Testability - Pure functions and dependency injection throughout
Documentation
- Examples - Practical usage patterns and integration guides
- Contributing - Development workflow and standards
Use Cases
ForgeFlow excels at:
- Fraud Detection - Real-time feature serving with drift monitoring
- Recommendation Systems - Reproducible feature pipelines at scale
- Credit Risk - Audit trails and regulatory compliance
- Predictive Maintenance - Time-series feature engineering
Requirements
- Python 3.10+
- Core: pandas, numpy, pydantic, structlog
- Optional: redis (serving), sqlalchemy (database)
License
MIT License - see LICENSE for details.
Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Built with ❤️ for production ML teams who value reliability over convenience.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file forge_flow-0.1.0.tar.gz.
File metadata
- Download URL: forge_flow-0.1.0.tar.gz
- Upload date:
- Size: 24.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d914f35651c9a7364687a5fdcf22fb693dfb68557c0b69e8980e1c6d60334ee9
|
|
| MD5 |
4722ebf802f08d67fbf8d004664b6951
|
|
| BLAKE2b-256 |
5ff849f0cc58753f5395e608a1b50032de72cfa19c3825b7dfeae0bbeb3e69d1
|
Provenance
The following attestation bundles were made for forge_flow-0.1.0.tar.gz:
Publisher:
publish.yml on danyalaltaff11555/forge-flow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
forge_flow-0.1.0.tar.gz -
Subject digest:
d914f35651c9a7364687a5fdcf22fb693dfb68557c0b69e8980e1c6d60334ee9 - Sigstore transparency entry: 774487463
- Sigstore integration time:
-
Permalink:
danyalaltaff11555/forge-flow@01ec23dccdaac70947dc6cb124b3c58731bd3d21 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/danyalaltaff11555
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@01ec23dccdaac70947dc6cb124b3c58731bd3d21 -
Trigger Event:
release
-
Statement type:
File details
Details for the file forge_flow-0.1.0-py3-none-any.whl.
File metadata
- Download URL: forge_flow-0.1.0-py3-none-any.whl
- Upload date:
- Size: 28.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
932055791d5d3f967b5f1d60cba45c12e5bf98e66ede6603b697d57f454aeda0
|
|
| MD5 |
bfcdb6c14388eb4998c04933fa51a349
|
|
| BLAKE2b-256 |
bbf813ddb1b2673d69f8ae79283d06776f6aee9afeeb31bcade9e41afba1d764
|
Provenance
The following attestation bundles were made for forge_flow-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on danyalaltaff11555/forge-flow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
forge_flow-0.1.0-py3-none-any.whl -
Subject digest:
932055791d5d3f967b5f1d60cba45c12e5bf98e66ede6603b697d57f454aeda0 - Sigstore transparency entry: 774487464
- Sigstore integration time:
-
Permalink:
danyalaltaff11555/forge-flow@01ec23dccdaac70947dc6cb124b3c58731bd3d21 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/danyalaltaff11555
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@01ec23dccdaac70947dc6cb124b3c58731bd3d21 -
Trigger Event:
release
-
Statement type: