A Flask web application for refactoring and formatting Python code with syntax highlighting.
- Dark-themed UI with Monokai color scheme
- Real-time syntax highlighting
- Dual text editors (editable input, read-only output)
- Copy to clipboard functionality
- Ready for black/autopep8 integration
- Install dependencies:
pip install -r requirements.txt- Run the application:
python app.py- Open browser to
http://localhost:5000
To add code formatting functionality, follow the simple steps in app.py:
STEP 1: Add import at the top (line 2):
import blackSTEP 2: Replace line 38 with:
refactored_code = black.format_str(original_code, mode=black.Mode())This app is configured for deployment on Render or other platforms that support Python web applications.
- Backend: Flask
- Frontend: HTML, CSS, JavaScript
- Syntax Highlighting: Highlight.js
- Code Formatting: black/autopep8 (to be implemented)