cognee/examples/python
lxobr 6dbd8e85a1
feat: dynamic multiple edges in datapoints (#1212)
<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->
- Improved list handling, removed `.index` logic from
`get_graph_from_model`, transitioned to fully datapoint-oriented
processing
- Streamlined datapoint iteration by introducing `_datapoints_generator`
with nested loops
- Generalized field processing to handle mixed lists: `[DataPoint,
(Edge, DataPoint), (Edge, [DataPoint])]`, allowing dynamic multiple
edges generation
- Small improvements and refactorings
- Added tests to `test_get_graph_from_model_flexible_edges()` covering
weighted edges and dynamic multiple edges
- Created `dynamic_multiple_edges_example.py` demonstrating dynamic
multiple edges

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.
2025-08-07 14:50:45 +02:00
..
ontology_input_example Feat: Adds ontology scientific paper demo (#662) 2025-03-25 17:21:29 +01:00
agentic_reasoning_procurement_example.py feat: Cog 2082 add BAML to cognee (#1054) 2025-08-06 10:41:47 +02:00
code_graph_example.py Jspv structlog auto config fix (#907) 2025-06-11 09:26:23 -04:00
cognee_simple_document_demo.py Cognee simple document example (#521) 2025-02-11 13:58:35 +01:00
dynamic_multiple_edges_example.py feat: dynamic multiple edges in datapoints (#1212) 2025-08-07 14:50:45 +02:00
dynamic_steps_example.py Jspv structlog auto config fix (#907) 2025-06-11 09:26:23 -04:00
graphiti_example.py feat: Cog 2082 add BAML to cognee (#1054) 2025-08-06 10:41:47 +02:00
multimedia_example.py Jspv structlog auto config fix (#907) 2025-06-11 09:26:23 -04:00
ontology_demo_example.py Jspv structlog auto config fix (#907) 2025-06-11 09:26:23 -04:00
ontology_demo_example_2.py Jspv structlog auto config fix (#907) 2025-06-11 09:26:23 -04:00
relational_database_migration_example.py refactor: Update rel db example (#985) 2025-06-13 18:33:40 +02:00
simple_example.py Jspv structlog auto config fix (#907) 2025-06-11 09:26:23 -04:00
simple_node_set_example.py Jspv structlog auto config fix (#907) 2025-06-11 09:26:23 -04:00
weighted_edges_example.py feat: Weighted edges (#1068) 2025-07-14 21:26:25 +02:00
weighted_graph_visualization.html added fix to weighted edges 2025-08-02 21:09:58 +02:00