Skip to content

PyBlueprint is an advanced static analysis dashboard that combines Halstead Software Physics with Neural Intelligence (CodeT5) to visualize technical debt, complexity, and security risks in Python code.

Notifications You must be signed in to change notification settings

pushtikadia/PyBluePrint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ—οΈ PyBluePrint

The Software Physics & Neural Architecture Engine. Decode Complexity. Visualize Technical Debt. Secure Your Logic.

Python Streamlit AI Physics

PyBlueprint is an advanced static analysis dashboard designed for software architects and senior developers. Unlike standard linters that merely check syntax, PyBlueprint combines Neural Intelligence (AI) with Halstead Software Physics to provide a deep, structural health scan of your Python codebase.

It answers the critical question: "Is this code maintainable, secure, and logically sound?"


⚑ Key Capabilities

πŸ“‘ The Risk Radar

A unique, real-time visualization (powered by Plotly) that triangulates code health across three vectors:

  • Maintainability: How hard is it to modify this code later?
  • Structural Simplicity: Is the Cyclomatic Complexity too high?
  • Security: Are there logic vulnerabilities?

🧠 Neural Interpretation Engine

Leverages the Salesforce CodeT5 transformer model to:

  • Generate "Technical Briefs" (plain-English summaries of complex logic).
  • Provide AI-driven refactoring strategies to reduce nesting and improve readability.

βš›οΈ Halstead Software Physics

Goes beyond line counts to calculate scientific metrics:

  • Program Volume (Bits): The information density of your logic.
  • Mental Effort: The cognitive load required for a human to understand the algorithm.
  • Difficulty: The statistical probability of introducing errors during changes.

πŸ›‘οΈ Security Sentry

An AST-based static scanner that proactively detects:

  • Hardcoded secrets (API Keys, Passwords, Tokens).
  • Dangerous execution vectors (eval(), exec(), os.system).

πŸ› οΈ Technical Stack

  • Core: Python 3.x
  • Interface: Streamlit (Custom "Blueprint" Dark Mode)
  • Visualization: Plotly Interactive Radar Charts
  • AI Backend: Hugging Face Transformers (Salesforce/codet5-base-multi-sum)
  • Static Analysis: Radon & Python AST

πŸš€ Deployment Guide

  1. InstallationClone the repo and install the required scientific and AI libraries. git clone https://github.com/yourusername/PyBlueprint.git cd PyBlueprint pip install -r requirements.txt

  2. Launch the Architect Engine Start the local server. The AI model (approx. 500MB) will auto-download on the first run.

    streamlit run app.py

  3. Usage Paste Code: Input raw Python source code into the dashboard buffer. Generate Blueprint: Click the analysis trigger. Review:

    • Check the Radar Chart for immediate health visualization.
    • Read the Neural Brief for logic verification.
    • Consult the Security Audit for vulnerabilities.

πŸ“‚ Repository Structure

PyBlueprint_v2/
β”œβ”€β”€ app.py                  # πŸ–₯️ The Architect Dashboard entry point
β”œβ”€β”€ requirements.txt        # πŸ“¦ ML and Analytics dependencies
└── modules/
    β”œβ”€β”€ brain.py            # 🧠 AI Logic (Neural Network Interface)
    └── inspector.py        # πŸ•΅οΈ Static Analysis & Security Scanner


PyBluePrint - Created by Pushti Kadia

About

PyBlueprint is an advanced static analysis dashboard that combines Halstead Software Physics with Neural Intelligence (CodeT5) to visualize technical debt, complexity, and security risks in Python code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages