sayou-visualizer 0.0.12__tar.gz → 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. {sayou_visualizer-0.0.12 → sayou_visualizer-0.1.0}/PKG-INFO +96 -40
  2. sayou_visualizer-0.1.0/README.md +127 -0
  3. {sayou_visualizer-0.0.12 → sayou_visualizer-0.1.0}/pyproject.toml +5 -5
  4. sayou_visualizer-0.0.12/README.md +0 -71
  5. {sayou_visualizer-0.0.12 → sayou_visualizer-0.1.0}/.gitignore +0 -0
  6. {sayou_visualizer-0.0.12 → sayou_visualizer-0.1.0}/examples/quick_start.py +0 -0
  7. {sayou_visualizer-0.0.12 → sayou_visualizer-0.1.0}/examples/quick_start_ws_client.py +0 -0
  8. {sayou_visualizer-0.0.12 → sayou_visualizer-0.1.0}/examples/quick_start_ws_server.py +0 -0
  9. {sayou_visualizer-0.0.12 → sayou_visualizer-0.1.0}/src/sayou/visualizer/__init__.py +0 -0
  10. {sayou_visualizer-0.0.12 → sayou_visualizer-0.1.0}/src/sayou/visualizer/core/exceptions.py +0 -0
  11. {sayou_visualizer-0.0.12 → sayou_visualizer-0.1.0}/src/sayou/visualizer/core/schemas.py +0 -0
  12. {sayou_visualizer-0.0.12 → sayou_visualizer-0.1.0}/src/sayou/visualizer/core/styles.py +0 -0
  13. {sayou_visualizer-0.0.12 → sayou_visualizer-0.1.0}/src/sayou/visualizer/interfaces/base_renderer.py +0 -0
  14. {sayou_visualizer-0.0.12 → sayou_visualizer-0.1.0}/src/sayou/visualizer/pipeline.py +0 -0
  15. {sayou_visualizer-0.0.12 → sayou_visualizer-0.1.0}/src/sayou/visualizer/renderer/analytic_kg_renderer.py +0 -0
  16. {sayou_visualizer-0.0.12 → sayou_visualizer-0.1.0}/src/sayou/visualizer/renderer/pyvis_renderer.py +0 -0
  17. {sayou_visualizer-0.0.12 → sayou_visualizer-0.1.0}/src/sayou/visualizer/renderer/showcase_kg_renderer.py +0 -0
  18. {sayou_visualizer-0.0.12 → sayou_visualizer-0.1.0}/src/sayou/visualizer/tracer/graph_tracer.py +0 -0
  19. {sayou_visualizer-0.0.12 → sayou_visualizer-0.1.0}/src/sayou/visualizer/tracer/rich_tracer.py +0 -0
  20. {sayou_visualizer-0.0.12 → sayou_visualizer-0.1.0}/src/sayou/visualizer/tracer/websocket_tracer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sayou-visualizer
3
- Version: 0.0.12
3
+ Version: 0.1.0
4
4
  Summary: Visualizer components for the Sayou Data Platform
5
5
  Project-URL: Homepage, https://www.sayouzone.com/
6
6
  Project-URL: Documentation, https://sayouzone.github.io/sayou-fabric/
@@ -209,15 +209,15 @@ License: Apache License
209
209
  limitations under the License.
210
210
  Classifier: License :: OSI Approved :: Apache Software License
211
211
  Classifier: Operating System :: OS Independent
212
- Classifier: Programming Language :: Python :: 3.9
213
- Classifier: Programming Language :: Python :: 3.10
214
212
  Classifier: Programming Language :: Python :: 3.11
213
+ Classifier: Programming Language :: Python :: 3.12
214
+ Classifier: Programming Language :: Python :: 3.13
215
215
  Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
216
- Requires-Python: >=3.9
216
+ Requires-Python: >=3.11
217
217
  Requires-Dist: networkx==3.2.1
218
218
  Requires-Dist: pyvis==0.3.2
219
219
  Requires-Dist: rich==14.2.0
220
- Requires-Dist: sayou-core~=0.3.0
220
+ Requires-Dist: sayou-core~=0.4.0
221
221
  Requires-Dist: websocket-client==1.9.0
222
222
  Description-Content-Type: text/markdown
223
223
 
@@ -228,67 +228,123 @@ Description-Content-Type: text/markdown
228
228
 
229
229
  **The Interactive Observability Engine for Sayou Fabric.**
230
230
 
231
- `sayou-visualizer` provides a transparent layer to monitor and visualize the execution flow of Sayou components. By attaching to any pipeline, it transforms invisible execution logs into intuitive, interactive **HTML Knowledge Graphs**.
231
+ `sayou-visualizer` provides transparency to the "Black Box" of data pipelines. It transforms invisible execution logs and complex graph data structures into intuitive, interactive **3D Holographic Knowledge Graphs**.
232
232
 
233
- It separates the logic of **Observation** (Tracer) from **Presentation** (Renderer), allowing you to debug complex pipelines and visualize data lineage without modifying your core logic.
233
+ It serves two distinct purposes: **Pipeline Telemetry** (Debugging flow) and **Knowledge Rendering** (Showcasing data topology).
234
234
 
235
- ## 💡 Core Philosophy
235
+ ---
236
236
 
237
- **"Trace the Process, Render the Insight."**
237
+ ## 1. Architecture & Role
238
238
 
239
- Observability should not be an afterthought. We decouple the responsibility into two roles:
239
+ The Visualizer operates as a separate layer that can attach to a running pipeline (Tracer) or read static data (Renderer) to generate HTML artifacts.
240
240
 
241
- 1. **Tracer (Recorder)**: The "Camera". It silently observes events (`on_start`, `on_finish`) from the pipeline via the Callback system and builds an internal graph structure.
241
+ ```mermaid
242
+ graph LR
243
+ Data[Pipeline / JSON] --> Pipeline[Visualizer Pipeline]
244
+
245
+ subgraph Renderers
246
+ Tracer[DAG Tracer]
247
+ Analyst[Analyst KG View]
248
+ Showcase[Showcase 3D View]
249
+ end
250
+
251
+ Pipeline --> Renderers
252
+ Renderers --> HTML[Interactive HTML]
253
+ ```
254
+
255
+ ### 1.1. Core Features
256
+ * **Non-Intrusive Monitoring**: Attaches to any Sayou pipeline via the callback system to visualize execution flow without modifying code.
257
+ * **Deterministic Layout**: Uses physics-based rendering (Cytoscape/Force-Graph) to reveal clusters and outliers in your data.
258
+ * **Interactive Inspection**: Click on nodes to inspect raw attributes, source code, or relationships in real-time.
259
+
260
+ ---
242
261
 
243
- 2. **Renderer (Painter)**: The "Canvas". It takes the recorded graph and generates human-readable artifacts (e.g., Interactive HTML, Static Images).
262
+ ## 2. Available Strategies
244
263
 
245
- This separation enables a Non-intrusive Monitoring experience, where visualization is just a plug-and-play feature.
264
+ `sayou-visualizer` offers specialized views depending on who is looking at the data.
246
265
 
247
- ## 📦 Installation
266
+ | Strategy Key | Target Audience | Description |
267
+ | :--- | :--- | :--- |
268
+ | **`tracer`** | Data Engineer | Visualizes the **Pipeline Execution Flow** (DAG). Shows which components triggered which tasks. |
269
+ | **`analyst`** | QA / Researcher | **2D Analytic View**. Focuses on strict schema validation, attribute inspection, and debugging specific relationships. |
270
+ | **`showcase`** | Stakeholder | **3D Holographic View**. A visually stunning, high-performance renderer for presenting the scale and topology of the Knowledge Graph. |
271
+
272
+ ---
273
+
274
+ ## 3. Installation
248
275
 
249
276
  ```bash
250
277
  pip install sayou-visualizer
251
278
  ```
252
279
 
253
- ## ⚡ Quick Start
280
+ ---
281
+
282
+ ## 4. Usage
254
283
 
255
- The `VisualizerPipeline` acts as a facade, easily attaching to other pipelines to generate reports.
284
+ The `VisualizerPipeline` is the entry point. You can use it to render existing graph files or attach it to live pipelines.
285
+
286
+ ### Case A: Rendering a Knowledge Graph (3D Showcase)
287
+
288
+ Visualizes the output of `sayou-assembler` as an interactive 3D galaxy.
256
289
 
257
290
  ```python
258
- from sayou.connector.pipeline import ConnectorPipeline
259
- from sayou.visualizer.pipeline import VisualizerPipeline
291
+ from sayou.visualizer import VisualizerPipeline
292
+
293
+ viz = VisualizerPipeline()
294
+
295
+ kg_file_path = "./output/graph_data.json"
296
+
297
+ viz.process(
298
+ source=kg_file_path,
299
+ destination="./output/report_showcase.html",
300
+ strategy="showcase"
301
+ )
260
302
 
261
- def main():
262
- connector = ConnectorPipeline()
303
+ print("Report generated. Open 'report_showcase.html' in your browser.")
304
+ ```
305
+
306
+ ### Case B: Debugging Graph Data (2D Analyst)
307
+
308
+ Generates a detailed 2D view for inspecting node attributes and edge types.
309
+
310
+ ```python
311
+ viz.process(
312
+ source=kg_file_path,
313
+ destination="./output/report_analyst.html",
314
+ strategy="analyst"
315
+ )
316
+ ```
317
+
318
+ ### Case C: Pipeline Tracing (Live Monitoring)
319
+
320
+ Attaches to a running Connector pipeline to visualize the crawling process.
321
+
322
+ ```python
323
+ from sayou.connector import ConnectorPipeline
324
+ from sayou.visualizer import VisualizerPipeline
263
325
 
264
- viz = VisualizerPipeline()
265
- viz.attach_to(connector)
326
+ connector = ConnectorPipeline()
266
327
 
267
- print("🚀 Running Pipeline...")
268
- iterator = connector.run("http://example.com")
269
- for packet in iterator:
270
- print(f"Processed: {packet.task.uri}")
328
+ viz = VisualizerPipeline()
329
+ viz.attach_to(connector)
271
330
 
272
- print("🎨 Generating Report...")
273
- viz.report("examples/pipeline_flow.html")
331
+ connector.process(source="https://news.daum.net/tech", strategy="web")
274
332
 
275
- if __name__ == "__main__":
276
- main()
333
+ viz.report("pipeline_trace.html")
277
334
  ```
278
335
 
279
- ## 🔑 Key Concepts
336
+ ---
280
337
 
281
- ### Tracers
282
- * **`GraphTracer`**: Listens to pipeline events and constructs a `NetworkX` Directed Acyclic Graph (DAG) in real-time. It distinguishes between Components (Generator/Fetcher) and Data (Tasks).
338
+ ## 5. Configuration Keys
283
339
 
284
- ### Renderers
285
- * **`PyVisRenderer`**: Converts the internal graph into an interactive HTML file powered by `Vis.js`. Features physics-based layout and modern dark UI.
286
- * **`RichRenderer`** (_Planned_): Displays a tree-structure summary directly in the console using the `Rich` library.
340
+ Customize the visual appearance via the `config` dictionary.
287
341
 
288
- ## 🤝 Contributing
342
+ * **`showcase`**: `node_color_by` (e.g., class), `particle_speed`, `background_color`.
343
+ * **`analyst`**: `layout_algorithm` (dagre/concentric), `show_attributes` (bool).
344
+ * **`tracer`**: `include_data_payload` (bool), `max_events`.
289
345
 
290
- We welcome contributions for new Renderers (e.g., `MatplotlibRenderer`, `StreamlitRenderer`) or specialized Tracers for new components!
346
+ ---
291
347
 
292
- ## 📜 License
348
+ ## 6. License
293
349
 
294
- Apache 2.0 License © 2025 Sayouzone
350
+ Apache 2.0 License © 2026 **Sayouzone**
@@ -0,0 +1,127 @@
1
+ # sayou-visualizer
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/sayou-visualizer.svg?color=blue)](https://pypi.org/project/sayou-visualizer/)
4
+ [![License](https://img.shields.io/badge/License-Apache%202.0-red.svg)](https://www.apache.org/licenses/LICENSE-2.0)
5
+
6
+ **The Interactive Observability Engine for Sayou Fabric.**
7
+
8
+ `sayou-visualizer` provides transparency to the "Black Box" of data pipelines. It transforms invisible execution logs and complex graph data structures into intuitive, interactive **3D Holographic Knowledge Graphs**.
9
+
10
+ It serves two distinct purposes: **Pipeline Telemetry** (Debugging flow) and **Knowledge Rendering** (Showcasing data topology).
11
+
12
+ ---
13
+
14
+ ## 1. Architecture & Role
15
+
16
+ The Visualizer operates as a separate layer that can attach to a running pipeline (Tracer) or read static data (Renderer) to generate HTML artifacts.
17
+
18
+ ```mermaid
19
+ graph LR
20
+ Data[Pipeline / JSON] --> Pipeline[Visualizer Pipeline]
21
+
22
+ subgraph Renderers
23
+ Tracer[DAG Tracer]
24
+ Analyst[Analyst KG View]
25
+ Showcase[Showcase 3D View]
26
+ end
27
+
28
+ Pipeline --> Renderers
29
+ Renderers --> HTML[Interactive HTML]
30
+ ```
31
+
32
+ ### 1.1. Core Features
33
+ * **Non-Intrusive Monitoring**: Attaches to any Sayou pipeline via the callback system to visualize execution flow without modifying code.
34
+ * **Deterministic Layout**: Uses physics-based rendering (Cytoscape/Force-Graph) to reveal clusters and outliers in your data.
35
+ * **Interactive Inspection**: Click on nodes to inspect raw attributes, source code, or relationships in real-time.
36
+
37
+ ---
38
+
39
+ ## 2. Available Strategies
40
+
41
+ `sayou-visualizer` offers specialized views depending on who is looking at the data.
42
+
43
+ | Strategy Key | Target Audience | Description |
44
+ | :--- | :--- | :--- |
45
+ | **`tracer`** | Data Engineer | Visualizes the **Pipeline Execution Flow** (DAG). Shows which components triggered which tasks. |
46
+ | **`analyst`** | QA / Researcher | **2D Analytic View**. Focuses on strict schema validation, attribute inspection, and debugging specific relationships. |
47
+ | **`showcase`** | Stakeholder | **3D Holographic View**. A visually stunning, high-performance renderer for presenting the scale and topology of the Knowledge Graph. |
48
+
49
+ ---
50
+
51
+ ## 3. Installation
52
+
53
+ ```bash
54
+ pip install sayou-visualizer
55
+ ```
56
+
57
+ ---
58
+
59
+ ## 4. Usage
60
+
61
+ The `VisualizerPipeline` is the entry point. You can use it to render existing graph files or attach it to live pipelines.
62
+
63
+ ### Case A: Rendering a Knowledge Graph (3D Showcase)
64
+
65
+ Visualizes the output of `sayou-assembler` as an interactive 3D galaxy.
66
+
67
+ ```python
68
+ from sayou.visualizer import VisualizerPipeline
69
+
70
+ viz = VisualizerPipeline()
71
+
72
+ kg_file_path = "./output/graph_data.json"
73
+
74
+ viz.process(
75
+ source=kg_file_path,
76
+ destination="./output/report_showcase.html",
77
+ strategy="showcase"
78
+ )
79
+
80
+ print("Report generated. Open 'report_showcase.html' in your browser.")
81
+ ```
82
+
83
+ ### Case B: Debugging Graph Data (2D Analyst)
84
+
85
+ Generates a detailed 2D view for inspecting node attributes and edge types.
86
+
87
+ ```python
88
+ viz.process(
89
+ source=kg_file_path,
90
+ destination="./output/report_analyst.html",
91
+ strategy="analyst"
92
+ )
93
+ ```
94
+
95
+ ### Case C: Pipeline Tracing (Live Monitoring)
96
+
97
+ Attaches to a running Connector pipeline to visualize the crawling process.
98
+
99
+ ```python
100
+ from sayou.connector import ConnectorPipeline
101
+ from sayou.visualizer import VisualizerPipeline
102
+
103
+ connector = ConnectorPipeline()
104
+
105
+ viz = VisualizerPipeline()
106
+ viz.attach_to(connector)
107
+
108
+ connector.process(source="https://news.daum.net/tech", strategy="web")
109
+
110
+ viz.report("pipeline_trace.html")
111
+ ```
112
+
113
+ ---
114
+
115
+ ## 5. Configuration Keys
116
+
117
+ Customize the visual appearance via the `config` dictionary.
118
+
119
+ * **`showcase`**: `node_color_by` (e.g., class), `particle_speed`, `background_color`.
120
+ * **`analyst`**: `layout_algorithm` (dagre/concentric), `show_attributes` (bool).
121
+ * **`tracer`**: `include_data_payload` (bool), `max_events`.
122
+
123
+ ---
124
+
125
+ ## 6. License
126
+
127
+ Apache 2.0 License © 2026 **Sayouzone**
@@ -7,24 +7,24 @@ build-backend = "hatchling.build"
7
7
  # -----------------
8
8
  [project]
9
9
  name = "sayou-visualizer"
10
- version = "0.0.12"
10
+ version = "0.1.0"
11
11
  authors = [
12
12
  { name = "Sayouzone", email = "contact@sayouzone.com" },
13
13
  ]
14
14
  description = "Visualizer components for the Sayou Data Platform"
15
15
  readme = "README.md"
16
16
  license = { file = "../../LICENSE" }
17
- requires-python = ">=3.9"
17
+ requires-python = ">=3.11"
18
18
  classifiers = [
19
- "Programming Language :: Python :: 3.9",
20
- "Programming Language :: Python :: 3.10",
21
19
  "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Programming Language :: Python :: 3.13",
22
22
  "License :: OSI Approved :: Apache Software License",
23
23
  "Operating System :: OS Independent",
24
24
  "Topic :: Software Development :: Libraries :: Application Frameworks",
25
25
  ]
26
26
  dependencies = [
27
- "sayou-core ~= 0.3.0",
27
+ "sayou-core ~= 0.4.0",
28
28
  "networkx == 3.2.1",
29
29
  "pyvis == 0.3.2",
30
30
  "rich == 14.2.0",
@@ -1,71 +0,0 @@
1
- # sayou-visualizer
2
-
3
- [![PyPI version](https://img.shields.io/pypi/v/sayou-visualizer.svg?color=blue)](https://pypi.org/project/sayou-visualizer/)
4
- [![License](https://img.shields.io/badge/License-Apache%202.0-red.svg)](https://www.apache.org/licenses/LICENSE-2.0)
5
-
6
- **The Interactive Observability Engine for Sayou Fabric.**
7
-
8
- `sayou-visualizer` provides a transparent layer to monitor and visualize the execution flow of Sayou components. By attaching to any pipeline, it transforms invisible execution logs into intuitive, interactive **HTML Knowledge Graphs**.
9
-
10
- It separates the logic of **Observation** (Tracer) from **Presentation** (Renderer), allowing you to debug complex pipelines and visualize data lineage without modifying your core logic.
11
-
12
- ## 💡 Core Philosophy
13
-
14
- **"Trace the Process, Render the Insight."**
15
-
16
- Observability should not be an afterthought. We decouple the responsibility into two roles:
17
-
18
- 1. **Tracer (Recorder)**: The "Camera". It silently observes events (`on_start`, `on_finish`) from the pipeline via the Callback system and builds an internal graph structure.
19
-
20
- 2. **Renderer (Painter)**: The "Canvas". It takes the recorded graph and generates human-readable artifacts (e.g., Interactive HTML, Static Images).
21
-
22
- This separation enables a Non-intrusive Monitoring experience, where visualization is just a plug-and-play feature.
23
-
24
- ## 📦 Installation
25
-
26
- ```bash
27
- pip install sayou-visualizer
28
- ```
29
-
30
- ## ⚡ Quick Start
31
-
32
- The `VisualizerPipeline` acts as a facade, easily attaching to other pipelines to generate reports.
33
-
34
- ```python
35
- from sayou.connector.pipeline import ConnectorPipeline
36
- from sayou.visualizer.pipeline import VisualizerPipeline
37
-
38
- def main():
39
- connector = ConnectorPipeline()
40
-
41
- viz = VisualizerPipeline()
42
- viz.attach_to(connector)
43
-
44
- print("🚀 Running Pipeline...")
45
- iterator = connector.run("http://example.com")
46
- for packet in iterator:
47
- print(f"Processed: {packet.task.uri}")
48
-
49
- print("🎨 Generating Report...")
50
- viz.report("examples/pipeline_flow.html")
51
-
52
- if __name__ == "__main__":
53
- main()
54
- ```
55
-
56
- ## 🔑 Key Concepts
57
-
58
- ### Tracers
59
- * **`GraphTracer`**: Listens to pipeline events and constructs a `NetworkX` Directed Acyclic Graph (DAG) in real-time. It distinguishes between Components (Generator/Fetcher) and Data (Tasks).
60
-
61
- ### Renderers
62
- * **`PyVisRenderer`**: Converts the internal graph into an interactive HTML file powered by `Vis.js`. Features physics-based layout and modern dark UI.
63
- * **`RichRenderer`** (_Planned_): Displays a tree-structure summary directly in the console using the `Rich` library.
64
-
65
- ## 🤝 Contributing
66
-
67
- We welcome contributions for new Renderers (e.g., `MatplotlibRenderer`, `StreamlitRenderer`) or specialized Tracers for new components!
68
-
69
- ## 📜 License
70
-
71
- Apache 2.0 License © 2025 Sayouzone