Code2Flow Visualizer 🔄
Real-Time Code Execution Visualizer for Python
🎉 Now available on PyPI! Install with
pip install code2flow-visualizer
Code2Flow Visualizer is a powerful debugging and visualization library that generates interactive flowcharts of Python code execution. Watch your variables change step-by-step and understand complex logic flow like never before.
✨ Features
- 🔍 Step-by-step execution visualization - See how variables change during code execution
- 📊 Interactive flowcharts - Navigate through execution paths visually
- 📝 Jupyter Notebook integration - Works seamlessly in your favorite environment
- 🎨 Multiple export formats - Export to Mermaid.js, Graphviz, PNG, SVG
- 🚀 Real-time debugging - Like Python Tutor but more powerful and flexible
- 🔧 Customizable visualization - Configure colors, layout, and display options
🚀 Quick Start
pip install code2flow-visualizer
Basic Usage
from code2flow import visualize
@visualize
def fibonacci(n):
if n <= 1:
return n
return fibonacci(n-1) + fibonacci(n-2)
# This will generate an interactive flowchart
result = fibonacci(5)
Jupyter Notebook
from code2flow import FlowVisualizer
visualizer = FlowVisualizer()
visualizer.track_function(your_function)
visualizer.display() # Shows interactive widget
Export Options
from code2flow import CodeFlow
flow = CodeFlow()
flow.trace(your_code)
flow.export_mermaid("flowchart.md")
flow.export_graphviz("flowchart.dot")
flow.export_image("flowchart.png")
🛠️ Installation
Basic Installation
pip install code2flow-visualizer
Development Installation
pip install code2flow-visualizer[dev]
With Mermaid Support
pip install code2flow-visualizer[mermaid]
📖 Documentation
🎯 Why Code2Flow Visualizer?
Traditional debugging tools show you where your code fails, but Code2Flow Visualizer shows you how your code behaves. Perfect for:
- Understanding complex algorithms
- Teaching programming concepts
- Debugging recursive functions
- Visualizing data flow in applications
- Code reviews and documentation
📊 Example Output
┌─────────────────┐
│ fibonacci(5) │
│ n = 5 │
└─────┬───────────┘
│
▼
┌─────────────────┐
│ n > 1 ? │
│ True │
└─────┬───────────┘
│
▼
┌─────────────────┐
│ fibonacci(4) + │
│ fibonacci(3) │
└─────────────────┘
📄 License
MIT License - see LICENSE file for details.
🙋♂️ Support
Made with ❤️ for the Python community
Metadata
Release files for code2flow-visualizer 0.8.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| code2flow_visualizer-0.8.6.tar.gz | 26.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| code2flow_visualizer-0.8.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.6 kB
Release files / code2flow_visualizer-0.8.6.tar.gz
| Download URL | code2flow_visualizer-0.8.6.tar.gz |
|---|---|
| Size | 26.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b8a62e63a3e32d6821d03918cb1697a60cbaaba95c2fcead93fb84248d90ed81
|
|
BLAKE2b-256 checksum How to use checksums |
9ff1eef87c9b138ab3ea9f7b59f9b27f5ddd844d9a47eb79b089a44496936d5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|
Release files / code2flow_visualizer-0.8.6-py3-none-any.whl
| Download URL | code2flow_visualizer-0.8.6-py3-none-any.whl |
|---|---|
| Size | 29.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d728e13f2c043370551a4aea14cf86054e51362fd1ba95add7e8ce41b7536b9
|
|
BLAKE2b-256 checksum How to use checksums |
90e407d6218e465a924d31416ed0a15e08c00e901811b6387fdaafb109bcf1d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.10
|