Skip to main content

Code2Flow Visualizer ๐Ÿ”„

PyPI version Python 3.8+

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

code2flow_visualizer-0.8.6.tar.gz (26.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

code2flow_visualizer-0.8.6-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

Details for the file code2flow_visualizer-0.8.6.tar.gz.

File metadata

  • Download URL: code2flow_visualizer-0.8.6.tar.gz
  • Upload date:
  • Size: 26.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for code2flow_visualizer-0.8.6.tar.gz
Algorithm Hash digest
SHA256 b8a62e63a3e32d6821d03918cb1697a60cbaaba95c2fcead93fb84248d90ed81
MD5 5fb6aa63479eaf9cc62790083a1cd4b2
BLAKE2b-256 9ff1eef87c9b138ab3ea9f7b59f9b27f5ddd844d9a47eb79b089a44496936d5a

See more details on using hashes here.

File details

Details for the file code2flow_visualizer-0.8.6-py3-none-any.whl.

File metadata

File hashes

Hashes for code2flow_visualizer-0.8.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4d728e13f2c043370551a4aea14cf86054e51362fd1ba95add7e8ce41b7536b9
MD5 de08d5bb272d694f66ef27c54c1f43ec
BLAKE2b-256 90e407d6218e465a924d31416ed0a15e08c00e901811b6387fdaafb109bcf1d5

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.8.6 This release

2 files

0.8.5

2 files

0.8.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page