Skip to main content

Lightweight dataflow tracer for Python functions

Project description

NeuroFlow ๐Ÿง โœจ

PyPI version Python 3.8+ License: MIT

Ever wondered how your Python functions actually compute results? ๐Ÿค”

NeuroFlow transforms your mathematical functions into beautiful, interactive visual stories! Just add one decorator and watch your calculations come alive with stunning flowcharts that show exactly how your code thinks.

Perfect for: Students learning algorithms โ€ข Developers debugging complex math โ€ข Researchers explaining computations โ€ข Anyone curious about how code works!


๐ŸŽฏ What Makes NeuroFlow Special?

Before NeuroFlow: Your function is a black box ๐Ÿ“ฆ
After NeuroFlow: Every step is crystal clear! ๐Ÿ”โœจ

โœจ Why You'll Love NeuroFlow

๐ŸŽฏ Zero Learning Curve - Add @trace and you're done!
๐ŸŽจ Instagram-Worthy Graphs - Emojis, colors, and crystal-clear flow
โšก Instant Insights - See exactly where your math goes wrong (or right!)
๐Ÿ”ฌ Debug Like a Pro - Trace complex algorithms step-by-step
๐Ÿ“š Perfect for Teaching - Students finally "get" how algorithms work
๐Ÿš€ Production Ready - Thread-safe, type-safe, and battle-tested

๐Ÿš€ Get Started in 30 Seconds

pip install neuroflow-viz

That's it! No complex setup, no heavy dependencies. Just pure Python magic! โœจ

๐ŸŽฌ See It In Action (30-Second Demo)

from neuroflow import trace

@trace  # โ† This single line creates magic! โœจ
def compound_interest(principal, rate, years):
    return principal * (1 + rate)**years

# Run normally - but now you get BOTH result AND visual story!
result, graph = compound_interest(1000, 0.08, 3)
print(f"๐Ÿ’ฐ Your $1000 became: ${result:.2f}")  # $1259.71

# See the beautiful visualization
graph.save_dot("my_calculation.dot")
# ๐Ÿ‘† Paste this at: https://dreampuf.github.io/GraphvizOnline/

๐Ÿคฏ Mind = Blown! Your function now tells its own story!

๐ŸŽจ Prepare to Be Amazed

These aren't your typical boring flowcharts. NeuroFlow creates visual masterpieces that make math beautiful:

"Finally, I can SEE what my code is thinking!" - Every Developer Ever

๐Ÿ’ฐ Compound Interest - Watch Your Money Grow!

Compound Interest Graph Every step from $1000 โ†’ $1259.71 visualized with emojis and colors

๐Ÿ“ Distance Formula - Geometry Made Visual

Distance Formula Graph See Pythagorean theorem in action: 3ยฒ + 4ยฒ = 5ยฒ

๐Ÿ”ข Quadratic Formula - Algebra Comes Alive

Quadratic Formula Graph Watch the discriminant calculation unfold step-by-step

๐Ÿง  Neural Network - AI Demystified

Neural Activation Graph See how artificial neurons actually "think"

๐ŸŽฎ Interactive Demo - Try It Now!

Want to see the magic yourself? Run our demo and prepare to be amazed:

python demo.py  # ๐ŸŽฌ 4 stunning visualizations in seconds!

You'll get:

  • ๐Ÿ’ก "Aha!" moments as complex math becomes crystal clear
  • ๐ŸŽจ Beautiful graphs you'll want to frame on your wall
  • ๐Ÿง  Deep understanding of how algorithms really work
  • ๐Ÿ“ธ Screenshots to impress your colleagues

Warning: May cause sudden understanding of mathematics ๐Ÿ˜„

๐Ÿ› ๏ธ Real-World Examples (Copy & Paste Ready)

๐ŸŽ“ For Students - Finally Understand Math!

@trace
def quadratic_formula(a, b, c):
    """See the discriminant calculation step-by-step!"""
    discriminant = b**2 - 4*a*c
    sqrt_discriminant = discriminant**0.5
    return (-b + sqrt_discriminant) / (2*a)

result, graph = quadratic_formula(1, -5, 6)
# ๐ŸŽฏ Now you can SEE why the answer is 3.0!

๐Ÿ’ผ For Finance Pros - Visualize Your Models

@trace
def compound_interest(principal, rate, years):
    """Show clients exactly how their money grows!"""
    return principal * (1 + rate)**years

result, graph = compound_interest(1000, 0.08, 3)
# ๐Ÿ“ˆ Perfect for client presentations!

๐ŸŽฎ For Game Developers - Debug Physics

@trace
def distance_formula(x1, y1, x2, y2):
    """Visualize collision detection calculations!"""
    dx = x2 - x1
    dy = y2 - y1
    return (dx**2 + dy**2)**0.5

result, graph = distance_formula(0, 0, 3, 4)
# ๐ŸŽฏ See exactly how distance is calculated!

๐Ÿ–ผ๏ธ Turn Code Into Art

Two ways to see your beautiful graphs:

๐ŸŒ Instant Online Viewing (Recommended)

  1. Copy your .dot file content
  2. Paste at GraphvizOnline
  3. BAM! Instant beautiful visualization! โœจ

๐Ÿ’ป Local Rendering (For Pros)

# Install Graphviz once
sudo apt-get install graphviz  # Ubuntu/Debian
brew install graphviz          # macOS
# Windows: Download from graphviz.org

# Create stunning images
dot -Tpng your_graph.dot -o your_graph.png

๐Ÿ“š Simple API (You'll Master in 5 Minutes)

๐ŸŽฏ The Magic Decorator

@trace  # โ† This is literally all you need!
def your_function(args):
    return result

result, graph = your_function(inputs)  # Get both result AND visualization!

๐Ÿ“Š Graph Superpowers

# Quick text summary
print(graph.summary())  # See all operations at a glance

# Save beautiful visualization
graph.save_dot("my_graph.dot")  # Ready for viewing!

# Advanced: Direct DOT access
dot_content = graph.to_dot()  # Full control over output

๐ŸŽจ Pro Visualization

from neuroflow import visualize_graph

# One-liner to create and save
visualize_graph(graph, "output.dot")  # Done!

๐Ÿงฎ What Can NeuroFlow Trace?

Everything you need for mathematical computing:

โœ… All Math Operations: + - * / // % **
โœ… Advanced Functions: abs() -x (negation)
โœ… Smart Comparisons: == < <= > >=
โœ… Complex Data: Lists, tuples, dictionaries (nested too!)
โœ… Real-World Code: Financial models, ML algorithms, physics simulations

If it's math, NeuroFlow can visualize it! ๐ŸŽฏ

๐Ÿ›ก๏ธ Built-in Safety Net

NeuroFlow catches errors before they catch you:

@trace
def risky_calculation(x):
    return x / 0  # Uh oh!

try:
    result, graph = risky_calculation(10)
except ZeroDivisionError as e:
    print(f"NeuroFlow saved you: {e}")  # Clear, helpful errors!

No more mysterious crashes! ๐ŸŽฏ

โšก Production-Ready Features

๐Ÿ”’ Thread-Safe: Use in multi-threaded apps without worry
๐ŸŽฏ Type-Safe: Full type hints for better IDE support
๐Ÿš€ Performance: Minimal overhead, maximum insight
๐Ÿงช Battle-Tested: Comprehensive test suite ensures reliability

๐ŸŽฏ Perfect For

โœ… Mathematical Functions - See every calculation step
โœ… Algorithm Learning - Understand how code works
โœ… Debugging Complex Math - Find errors instantly
โœ… Teaching & Presentations - Make code visual
โœ… Research & Analysis - Document your computations

Note: Focuses on arithmetic operations (the heart of most algorithms!)

๐Ÿค Join the NeuroFlow Community

Love NeuroFlow? Help make it even better!

  • ๐Ÿ› Found a bug? Open an issue
  • ๐Ÿ’ก Have an idea? Start a discussion
  • ๐Ÿ”ง Want to contribute? Submit a PR
  • โญ Enjoying it? Star the repo!

Together, we're making code visualization accessible to everyone! ๐ŸŒŸ


๐ŸŽ‰ Ready to Transform Your Code?

pip install neuroflow-viz

In 30 seconds, you'll be creating beautiful visualizations that make complex math crystal clear!

Your future self (and your colleagues) will thank you. ๐Ÿ˜Š


MIT License | Made with โค๏ธ by Nipun Sujesh

NeuroFlow v0.2.0 - Where Code Meets Art ๐ŸŽจ

Project details


Download files

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

Source Distribution

neuroflow_viz-0.2.0.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

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

neuroflow_viz-0.2.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file neuroflow_viz-0.2.0.tar.gz.

File metadata

  • Download URL: neuroflow_viz-0.2.0.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.6

File hashes

Hashes for neuroflow_viz-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c24cfe0b264b3d8fc3955ac42d865d18f4c077863b275aaa370ae49a5b7e5c08
MD5 cf6b4c979531acfbefbec0a5914dc61b
BLAKE2b-256 0c028ff122a2c0490ab05321e4c0e7850398db10519c9d06e117e1e6212d47dd

See more details on using hashes here.

File details

Details for the file neuroflow_viz-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: neuroflow_viz-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.6

File hashes

Hashes for neuroflow_viz-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bac5201c9832240d60a370c2472043c94a78d5ddc3b131052b6c33fe147d5256
MD5 d9b64d69bc0806475279ee4fb2e8fcf6
BLAKE2b-256 8b4e19be5bf51e4f9107b03bf4767559138cea371966b9d9a3c616c66c02ff0e

See more details on using hashes here.

Supported by

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