Skip to main content

Python project analyzer and visualization tool

Project description

PyFlowMapper

Publish Python Package

PyFlowMapper is a lightweight Python static-analysis tool that helps you understand how functions connect and how data flows across your codebase — without running your code.

It is designed for developers who want fast architectural insight into new or existing Python projects.

What It Does

  • Reads Python source files using AST (no execution)
  • Detects which functions call which others
  • Tracks return-value–based data flow between functions
  • Generates clear Mermaid diagrams
  • Works with Python 3.12+
  • Automatically ignores virtual environments

Quick Install

# Clone and install
git clone https://github.com/ArunKoundinya/py-flow-mapper.git
cd py-flow-mapper
pip install -e .

# Or install directly
pip install py-flow-mapper

How to Use

Analyze Your Project

pyflow analyze /path/to/your/project

This creates a project_meta.json file with all the analysis results.

Create Diagrams

pyflow diagram /path/to/your/project/project_meta.json

See Project Structure

pyflow structure /path/to/your/project

Shows a clean tree view of your project folders and files.

What You Get

Metadata File — project_meta.json

Contains:

  • List of all functions and where they are
  • Which functions call which others
  • How data moves between functions
  • All imports and dependencies

One Types of Diagram

  • Detailed Flow Graph - Shows modules and data flow

Requirements

  • Python 3.12 or higher

Common Commands

Command What it does
pyflow analyze /path/to/project Analyze a project
pyflow diagram /path/to/project/project_meta.json Make diagrams
pyflow structure /path/to/project Show folder structure
pyflow --help Get help
pyflow version Check version

Features

✅ Works with any Python 3.12+ project
✅ No need to run your code
✅ Creates visual diagrams
✅ Shows data flow between functions
✅ Handles imports correctly
✅ Excludes virtual environments automatically

Tips

  • Start with a small project to see how it works
  • Use --entry-point if your main file isn't main.py
  • View diagrams in VS Code or GitHub for best results
  • The tool ignores venv/, .venv/, and other common exclude folders

Full Documentation

Full documentation (including examples and architecture diagrams) is available in the docs/ folder and built using Quarto.

⚠ Limitations

PyFlowMapper uses static analysis. It may not fully resolve:

  • Runtime imports
  • Heavy metaprogramming
  • Highly dynamic call patterns

Despite this, it provides a strong and reliable architectural baseline for most Python projects.

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

py_flow_mapper-0.1.0b6.dev0.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

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

py_flow_mapper-0.1.0b6.dev0-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file py_flow_mapper-0.1.0b6.dev0.tar.gz.

File metadata

  • Download URL: py_flow_mapper-0.1.0b6.dev0.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for py_flow_mapper-0.1.0b6.dev0.tar.gz
Algorithm Hash digest
SHA256 fa3b94323e1623367eecc097e6c41f7fb04782cc86357573b7f65ebcad9adb95
MD5 0ee12d8c535114c1c73f464ea2f22e63
BLAKE2b-256 0005a23a48b007d6c6f3e89367cd7ec880b2a856b1872e9a36eae289ec18929e

See more details on using hashes here.

File details

Details for the file py_flow_mapper-0.1.0b6.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for py_flow_mapper-0.1.0b6.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 26f9685885e88571c6ae971023f2c42d500f7b4c5f8ebd21cd9b8905c8e05774
MD5 0f15647a6873532b81c5e4c62f4eb09c
BLAKE2b-256 9d632998ab628601974de3a910afeb6dcc8a7ecfedc60c9d9e7082da9ca92ba0

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