{"data":{"slug":"chunelfeng-cgraph","name":"CGraph","tagline":"A common used C++ & Python DAG framework","github_url":"https://github.com/ChunelFeng/CGraph","owner":"ChunelFeng","repo":"CGraph","owner_avatar_url":"https://avatars.githubusercontent.com/u/37905059?v=4","primary_language":"C++","stars":2302,"forks":390,"topics":["ai","ai-agents","dag","graph","langgraph","pipeline","taskflow","workflow"],"archived":false,"github_pushed_at":"2026-09-07T06:42:25+00:00","maintenance_label":"Active","stars_delta_30d":8,"url":"https://www.graphcanon.com/tools/chunelfeng-cgraph","markdown_url":"https://www.graphcanon.com/tools/chunelfeng-cgraph.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/chunelfeng-cgraph","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=chunelfeng-cgraph","description":"【A common used C++ & Python DAG framework】 一个通用的、无三方依赖的、跨平台的、收录于awesome-cpp的、基于流图的并行计算框架。欢迎star & fork & 交流","homepage_url":"http://www.chunel.cn","license":"MIT","open_issues":11,"watchers":32,"ai_summary":"CGraph is a cross-platform Directed Acyclic Graph (DAG) framework based on pure C++ without any third-party dependencies, supporting the construction of custom operators and pipelines for various workflows.","readme_excerpt":"# pip install pycgraph\n\nimport time\nfrom datetime import datetime\n\nfrom pycgraph import GNode, GPipeline, CStatus\n\n\nclass MyNode1(GNode):\n    def run(self):\n        print(\"[{0}] {1}, sleep for 1 second ... \".format(datetime.now(), self.getName()))\n        time.sleep(1)\n        return CStatus()\n\nclass MyNode2(GNode):\n    def run(self):\n        print(\"[{0}] {1}, sleep for 2 second ... \".format(datetime.now(), self.getName()))\n        time.sleep(2)\n        return CStatus()\n\n\nif __name__ == '__main__':\n    pipeline = GPipeline()\n    a, b, c, d = MyNode1(), MyNode2(), MyNode1(), MyNode2()\n\n    pipeline.registerGElement(a, set(), \"nodeA\")\n    pipeline.registerGElement(b, {a}, \"nodeB\")\n    pipeline.registerGElement(c, {a}, \"nodeC\")\n    pipeline.registerGElement(d, {b, c}, \"nodeD\")\n\n    pipeline.process()\n```\n\n> <b>其他版本</b>\n\n* [CsCGraph](https://github.com/ChunelFeng/CsCGraph) : A CSharp native, CGraph-API-liked DAG project\n* [JaCGraph](https://github.com/ChunelFeng/JaCGraph) : A Java native, CGraph-API-liked DAG project\n* [GoCGraph](https://github.com/AsunaU2/GoCGraph) : A Go native, CGraph-API-liked DAG project\n* [CGraph-lite](https://github.com/ChunelFeng/CGraph-lite) : A one-header-only, CGraph-API-liked DAG project, lite version by C++\n\n----","github_created_at":"2021-04-26T12:06:33+00:00","created_at":"2026-07-15T10:48:53.558388+00:00","updated_at":"2026-09-20T04:27:38.5142+00:00","categories":[{"slug":"developer-tools","name":"Developer Tools","url":"https://www.graphcanon.com/categories/developer-tools","markdown_url":"https://www.graphcanon.com/categories/developer-tools.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/developer-tools"}],"tags":[{"slug":"ai","name":"ai"},{"slug":"ai-agents","name":"ai-agents"},{"slug":"dag","name":"dag"},{"slug":"graph","name":"graph"},{"slug":"pipeline","name":"pipeline"},{"slug":"taskflow","name":"taskflow"},{"slug":"workflow","name":"workflow"}],"trust":{"provenance":{"is_fork":false,"github_id":361735570,"owner_type":"User","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-09-17T06:00:09.010Z","maintenance":{"label":"Active","score":82,"methodology":"github_public_v1","releases_90d":1,"days_since_push":9,"last_release_at":"2026-08-15T07:57:49Z","stars_delta_30d":8,"open_issues_delta_30d":-3},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-15T10:48:55.177Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-09-17T06:00:09.476Z"},"languages":{"value":["c++"],"source":"github.language","observed_at":"2026-09-17T06:00:09.476Z"},"license_spdx":{"value":"MIT","source":"github.license","observed_at":"2026-09-17T06:00:09.476Z"}},"decision_facts":{"hosting":null,"pricing":{"model":"freemium","summary":"Free and open-source software with a MIT license, offering gratis usage for all, including for commercial purposes."},"requirements":{"notes":["C++11 support is required in your compiler.","Python version 'pycgraph' package is supported for Python API usage."],"min_ram_gb":0.5,"requires_docker":false},"constraints":{"min_ram_gb":0.5,"pricing_model":"freemium","requires_docker":false},"when_to_use":["Use CGraph when you need a cross-platform DAG framework that supports constructing custom operators directly in C++.","Choose it if your project benefits from Python API integration and requires handling both dependence and parallel execution.","Opt for CGraph if avoiding third-party library dependencies is crucial to your development environment."],"when_not_to_use":["Avoid using CGraph when your workflow primarily involves tasks that are better suited for language ecosystems outside of C++ and Python, such as Java or JavaScript.","Do not use this framework if you require specialized features provided by specific third-party libraries that enhance or tailor the capabilities beyond what pure C++ offers."],"source":"enrich:decision_facts","observed_at":"2026-07-17T06:15:06.196Z"},"constraint_facets":{"min_ram_gb":0.5,"pricing_model":"freemium","requires_docker":false},"decision_summary":[{"label":"Pricing","value":"freemium - Free and open-source software with a MIT license, offering gratis usage for all, including for commercial purposes."},{"label":"Requirements","value":"Min 0.5 GB RAM; C++11 support is required in your compiler.; Python version 'pycgraph' package is supported for Python API usage."},{"label":"Adopt for","value":"CGraph is a cross-platform Directed Acyclic Graph (DAG) framework in pure C++, aiding developers in building custom operators and pipelines for various workflows without any third-party dependencies."},{"label":"License detail","value":"MIT"}]}}