theandrelima/nornflow

GitHub: theandrelima/nornflow

NornFlow 是一个基于 Nornir 的网络自动化工作流编排工具,通过 YAML 配置和 Python 任务封装,为复杂的网络运维场景提供结构化、可预测的执行流程。

Stars: 38 | Forks: 5

# NornFlow [![CI](https://static.pigsec.cn/wp-content/uploads/repos/2026/04/b19b381517055222.svg)](https://github.com/theandrelima/nornflow/actions/workflows/ci.yml) ![Python Versions](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue) [![License](https://img.shields.io/badge/License-GPL%203.0-blue.svg)](https://opensource.org/licenses/GPL-3.0) [![PyPI version](https://badge.fury.io/py/nornflow.svg)](https://badge.fury.io/py/nornflow) [![Linter: Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![Style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Installer: uv](https://img.shields.io/badge/installer-uv-blue)](https://github.com/astral-sh/uv) ## 什么是 NornFlow? NornFlow 是一个基于 [Nornir](https://github.com/nornir-automation/nornir) 构建的轻量级工作流编排框架,为网络自动化项目带来了结构和可预测性。 NornFlow 通过提供以下功能弥合了开发团队和运维团队之间的鸿沟: - **结构化的工作流系统**:将 Nornir 任务组织为可复用的自动化流 - **声明式 YAML 接口**:用于定义复杂的自动化序列 - **命令行界面 (CLI)**:用于运行单个 Nornir 任务或完整的工作流 - **变量系统**:具有多级优先级,支持灵活的自定义 ## 为什么选择 NornFlow? NornFlow 促进了开发人员与网络工程师之间的协作: ⚡️ **开发人员的无限能力**:使用 Nornir 的任务接口,以纯 Python 函数的形式编写自动化逻辑。无需样板代码,只有简洁的 Python 代码。 🚀 **操作员的高效利器**:使用熟悉的 YAML 语法定义和运行工作流,使网络工程师无论其 Python 编程背景如何都能高效工作。 🔧 **高级自动化能力**:为 Nornir 扩展了超出原生功能的强大特性,包括: - 具有优先级的多级变量系统(环境、全局、域、工作流、CLI、运行时) - 丰富的 Jinja2 过滤器,用于高级模板渲染和数据操作 - Hooks 系统,用于在不修改任务代码的情况下扩展任务行为 - 灵活的失败策略(skip-failed、fail-fast、run-all),以实现稳健的错误处理 🧩 **项目友好型**:为 Nornir 项目带来可预测的结构: - 标准化的目录组织 - 一致的工作流定义模式 - 任务、工作流和清单之间的清晰分离 ## 文档 - [快速入门指南](https://github.com/theandrelima/nornflow/blob/main/docs/quick_start.md) - 快速上手 - [核心概念](https://github.com/theandrelima/nornflow/blob/main/docs/core_concepts.md) - 了解 NornFlow 的工作原理 - [变量基础](https://github.com/theandrelima/nornflow/blob/main/docs/variables_basics.md) - 理解 NornFlow 的变量系统 - [NornFlow 设置](https://github.com/theandrelima/nornflow/blob/main/docs/nornflow_settings.md) - 配置您的 NornFlow 环境 - [Jinja2 过滤器](https://github.com/theandrelima/nornflow/blob/main/docs/jinja2_filters.md) - 高级模板操作 - [Hooks 指南](https://github.com/theandrelima/nornflow/blob/main/docs/hooks_guide.md) - 使用自定义 hooks 扩展任务行为 - [API 参考](https://github.com/theandrelima/nornflow/blob/main/docs/api_reference.md) - 供扩展 NornFlow 的开发人员使用
标签:CLI, Docker 部署, LangChain, NetOps, Nornir, Python, Python 3.10, Python 3.11, Python 3.12, Python 3.13, WiFi技术, YAML, 任务调度, 安全库, 工作流编排, 开源框架, 持续集成, 无后门, 网络自动化, 网络运维, 自动化框架, 轻量级, 逆向工具