Metadata-Version: 2.4
Name: wpipe
Version: 1.6.3
Summary: Pipeline library with API integration for task orchestration and execution tracking
Home-page: https://github.com/wisrovi/wpipe
Author: William Steve Rodriguez Villamizar
Author-email: William Steve Rodriguez Villamizar <wisrovi.rodriguez@gmail.com>
License: MIT License
        
        Copyright (c) 2024 William Rodriguez
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/wisrovi/wpipe
Project-URL: Documentation, https://wpipe.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/wisrovi/wpipe
Project-URL: Issues, https://github.com/wisrovi/wpipe/issues
Project-URL: Changelog, https://github.com/wisrovi/wpipe/blob/main/CHANGELOG.md
Keywords: pipeline,workflow,tasks,orchestration,api,worker
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Intended Audience :: Developers
Classifier: Development Status :: 5 - Production/Stable
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.31.0
Requires-Dist: loguru>=0.7.0
Requires-Dist: pandas>=2.0.0
Requires-Dist: pyyaml>=6.0.1
Requires-Dist: tqdm>=4.66.0
Requires-Dist: rich>=13.7.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: fastapi>=0.100.0
Requires-Dist: uvicorn>=0.23.0
Requires-Dist: wsqlite>=0.1.0
Provides-Extra: dev
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: mypy>=1.7.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=7.2.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=2.0.0; extra == "docs"
Requires-Dist: sphinx-copybutton>=0.5.0; extra == "docs"
Requires-Dist: myst-parser>=2.0.0; extra == "docs"
Requires-Dist: sphinx-sitemap>=2.5.0; extra == "docs"
Requires-Dist: sphinx-design>=0.5.0; extra == "docs"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# 🚀 WPipe v1.6.3

**El motor de orquestación de pipelines más rápido, resiliente y puro para Python.**

WPipe es una librería industrial diseñada para automatizar flujos de trabajo complejos, garantizando que tus datos viajen seguros, tus procesos sean ultra-rápidos y tus fallos sean fáciles de diagnosticar.

[![PyPI version](https://badge.fury.io/py/wpipe.svg)](https://badge.fury.io/py/wpipe)
[![Documentation Status](https://readthedocs.org/projects/wpipe/badge/?version=latest)](https://wpipe.readthedocs.io/en/latest/?badge=latest)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

---

## 💎 ¿Por qué WPipe?

Diferénciate de los scripts lineales. WPipe te ofrece superpoderes:

- ⚡ **Modo Relámpago**: Optimización extrema de SQLite (WAL Mode) y monitorización de hardware sin bloqueos. ¡Velocidad de ráfaga real!
- 🧵 **Paralelismo Nativo**: Ejecuta tareas en Hilos o Procesos con un solo comando. Bypass del GIL para tareas pesadas de CPU.
- 🛡️ **Checkpoints Inteligentes**: Define hitos basados en expresiones lógicas. Si el sistema cae, WPipe reanuda exactamente donde se quedó.
- 🔍 **Captura de Errores Forense**: Olvídate de los errores genéricos. Recibe notificaciones detalladas con el archivo y la línea exacta del fallo.
- 🧬 **Contratos de Datos (TypeValidator)**: Valida tu "Bodega" de datos automáticamente con esquemas estrictos pero extensibles.
- 🔄 **Paridad Síncrona/Asíncrona**: Elige entre `Pipeline` o `PipelineAsync` con el 100% de las mismas funcionalidades.

---

## 🛠️ Instalación Instantánea

```bash
pip install wpipe
```

---

## 🚀 Ejemplo de Poder: El Viaje Resiliente

```python
from wpipe import Pipeline, For, Condition, Parallel, step, to_obj, PipelineContext

# 1. Definimos el contrato de nuestra Bodega
class MiContexto(PipelineContext):
    motor: str
    temperatura: float

# 2. Creamos estados inteligentes con validación automática
@step(name="Verificar", retry_count=3)
@to_obj(MiContexto) # <-- ACTIVA LA VALIDACIÓN Y CONVERSIÓN
def verificar_motor(ctx: MiContexto):
    print(f"Chequeando motor: {ctx.motor}")
    return {"temperatura": 85.5}

# 3. Orquestación de Alto Nivel
viaje = Pipeline(pipeline_name="Viaje_LTS", verbose=True)

# Añadimos hitos inteligentes
viaje.add_checkpoint("arranque", expression="temperatura > 0")

viaje.set_steps([
    verificar_motor,
    Parallel(
        steps=[revisar_luces, hechar_gasolina],
        max_workers=2
    ),
    For(iterations=10, steps=[conducir_paso])
])

results = viaje.run({"motor": "V8"})
```

---

## 📊 Observabilidad y Análisis

WPipe no solo ejecuta, **entiende** tu proceso.

- **AnalysisManager**: Obtén estadísticas de éxito, tiempos medios y detecta cuellos de botella automáticamente.
- **ResourceMonitor**: Controla el pico de RAM y el consumo de CPU de cada ejecución.
- **PipelineExporter**: Exporta tus reportes de ejecución a **JSON o CSV** listos para auditoría.

---

## 🌐 Dashboard Web

Visualiza tus pipelines en tiempo real con el dashboard integrado:

```python
from wpipe import start_dashboard

start_dashboard(db_path="mi_tracking.db", port=8000)
```

---

## 🛡️ Soporte y Calidad

- **LTS Policy**: WPipe v1.6+ cuenta con soporte a largo plazo.
- **95% Test Coverage**: Probado rigurosamente en entornos síncronos y asíncronos.
- **Arquitectura Pura**: Unificación total bajo `wsqlite`, eliminando SQL crudo del núcleo.

---

Diseñado con ❤️ por **William Rodriguez** (wisrovi) para ingenieros que no aceptan menos que la perfección.
