Skip to content

GiuSperrts/python-code-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Code Checker

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.

Features

  • 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

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/python-code-checker.git
    cd python-code-checker
  2. Create a virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
  3. Install dependencies:

    pip install -r requirements.txt

Usage

  1. Run the application:

    python app.py
  2. Open your browser and navigate to http://127.0.0.1:5001

  3. Paste your Python code and click "Check Code"

Deployment

Local Development

The app runs on Flask's development server. For production, use a WSGI server like Gunicorn.

Cloud Deployment

The app can be deployed to platforms supporting Python web apps:

  • Heroku
  • Railway
  • Render
  • DigitalOcean App Platform

Project Structure

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

Analysis Tools

  • 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

Example Code

See the "perfect code" example in the app for a demonstration of code that passes all checks.

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published