# py_pipeline_manager **Repository Path**: wyyuan/py_pipeline_manager ## Basic Information - **Project Name**: py_pipeline_manager - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-10 - **Last Updated**: 2026-05-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 管道流水线管理系统 A visual web-based pipeline execution framework built with Python and Eel. ## 项目简介 py_pipeline_manager 是一个可视化管道流水线管理系统,支持通过图形界面创建、编辑和执行数据处理流水线。系统采用节点式架构,每个节点都是一个独立的计算单元,通过输入/输出端口进行数据连接和传递。 ## 功能特性 - **可视化编辑器**:基于 Web 的图形界面,支持拖拽创建节点、连接端口 - **流水线执行**:完整的流水线执行引擎,支持阶段(Stage)和依赖管理 - **缓存机制**:智能缓存子系统,避免重复计算,提高执行效率 - **自定义节点**:支持通过 Python 类自定义计算节点 - **参数配置**:灵活的参数配置系统,支持多种数据类型 - **实时日志**:执行过程中实时输出日志信息 ## 核心架构 ### 1. Context 类 - 工作文件夹管理 - 共享缓存机制 - 全局状态存储 ### 2. CachedSubprocess 抽象类 - 输入/输出端口管理 - 缓存路径管理 - 执行状态控制 ### 3. Pipeline 类 - 阶段管理 - 流水线执行 - 缓存清理 ## 安装依赖 ```bash pip install -r requirements.txt ``` 依赖包括: - eel (Web 界面框架) - 其他依赖请查看 requirements.txt ## 运行项目 ```bash python main.py ``` 启动后,浏览器会自动打开 Web 界面。 ## 使用指南 ### 创建流水线 1. 在左侧面板选择节点类型 2. 点击画布添加节点 3. 拖拽端口进行连接 4. 在右侧面板配置节点参数 5. 点击运行按钮执行流水线 ### 自定义节点 参考 `test_nodes.py` 中的示例实现: ```python @register_node class MyNode(CachedSubprocess): def _execute(self): # 获取输入 input_data = self.get_input('data') # 执行计算 result = process(input_data) # 输出结果 self.set_output('result', result) ``` ### 节点注册 使用 `@register_node` 装饰器注册自定义节点,节点需要在 `nodes.json` 中配置基本信息。 ## 项目结构 ``` py_pipeline_manager/ ├── main.py # 主程序入口 ├── pipeline.py # 核心框架 ├── test_nodes.py # 示例节点 ├── requirements.txt # 依赖 ├── run_pipeline.py # 流水线运行器 └── web/ ├── index.html # 主界面 ├── config/ │ └── nodes.json └── js/ ├── app.js # 应用逻辑 ├── connections.js # 连接管理 └── properties.js # 属性面板 ``` ## 示例节点 项目包含以下示例节点: - `StudentGenerator`:生成学生数据 - `AgeStats`:年龄统计 - `HeightWeightStats`:身高体重统计 - `GenderStats`:性别统计 - `StudentReporter`:学生报告生成 ## 许可证 MIT License