A cross-platform, dependency-free C++ and Python DAG framework for building parallel computational graphs.
CGraph is a cross-platform Directed Acyclic Graph (DAG) framework for building and executing parallel computational workflows. It allows developers to define tasks as nodes in a graph, specify dependencies between them, and run independent tasks concurrently for optimized performance. The framework is written in pure C++11 with no third-party dependencies and also offers a full-featured Python API.
C++ and Python developers building data pipelines, parallel computation systems, workflow engines, or any application requiring structured task execution with complex dependencies and concurrency.
Developers choose CGraph for its dependency-free design, cross-platform support, and rich feature set—including conditional logic, loops, timeouts, and event handling—all while providing both C++ and Python APIs for flexibility.
【A common used C++ & Python DAG framework】 一个通用的、无三方依赖的、跨平台的、收录于awesome-cpp的、基于流图的并行计算框架。欢迎star & fork & 交流
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Written in pure C++11 with no third-party libraries, enabling easy cross-platform compilation and integration without external conflicts.
Supports conditional execution, loops, timeouts, event-driven workflows, and pauses/resumes, allowing complex pipeline orchestration as detailed in the README's feature list.
Offers pycgraph bindings with pip installation, providing the same expressive power as C++ for rapid prototyping or production use in Python environments.
Includes a configurable thread pool with work-stealing and dynamic thread adjustment, optimizing parallel execution for CPU-bound tasks.
Most tutorials, articles, and videos are in Chinese, with only a basic English README, which can hinder adoption by non-Chinese speakers.
The framework's extensive features—like aspects, adapters, and domains—require significant time to master, especially for developers new to DAG systems.
Compared to established alternatives like Taskflow, CGraph has a smaller community, fewer third-party integrations, and less battle-tested usage in large-scale projects.
For trivial or linear task flows, the DAG abstraction and scheduling mechanisms may introduce unnecessary complexity and minor performance overhead.