A comprehensive Python code analysis web application built with Flask. This app allows users to input Python code and receive detailed feedback from multiple analysis tools.
- Syntax Checking: Validates Python syntax using AST
- Code Quality Analysis: Pylint for comprehensive code quality assessment
- Style Enforcement: Flake8 for PEP 8 compliance
- Type Checking: MyPy for static type analysis
- Security Scanning: Bandit for security vulnerability detection
- Modern UI: Apple-inspired design with smooth animations
-
Clone the repository:
git clone https://github.com/yourusername/python-code-checker.git cd python-code-checker -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python app.py
-
Open your browser and navigate to
http://127.0.0.1:5001 -
Paste your Python code and click "Check Code"
The app runs on Flask's development server. For production, use a WSGI server like Gunicorn.
The app can be deployed to platforms supporting Python web apps:
- Heroku
- Railway
- Render
- DigitalOcean App Platform
python-code-checker/
├── app.py # Main Flask application
├── requirements.txt # Python dependencies
├── templates/ # HTML templates
│ ├── index.html # Input form
│ └── results.html # Results display
├── static/ # Static files (CSS, JS, images)
└── README.md # This file
- AST: Python's built-in Abstract Syntax Tree for syntax validation
- Pylint: Comprehensive code quality checker
- Flake8: Style guide enforcement and error detection
- MyPy: Static type checker
- Bandit: Security linter for Python code
See the "perfect code" example in the app for a demonstration of code that passes all checks.
MIT License