Python Minifier is a web tool that demonstrates how various technologies collaborate for code minification, execution, and sharing. This project incorporates Python, HTML, CSS, and JavaScript, along with modern frameworks and libraries.
- HTML5
- CSS3
- JavaScript
- Python
- Tailwind CSS - For easy CSS styling
- Vitejs - For modern front-end development
- Monaco Editor - For code editing
- Font Awesome - For icons
- QRCode - To make QR codes
- JSZip - To compress files in the browser
- Autoprefixer - For automatically adding vendor prefixes
- PostCSS - For transforming CSS with plugins
- Sass - For CSS pre-processing
- Terser - For JavaScript mangler and compressor
- Typewriterjs - For typing effects
- ApexCharts - For interactive charts
- CryptoJS - For cryptography tasks
- SweetAlert2 - For nice popup boxes
- Concurrently - For running multiple commands concurrently
- Replace-in-file - For replacing text in files easily
- Flask - A lightweight WSGI web application framework
- Flask-CORS - For enabling CORS in Flask
- Python Minifier - For minifying Python code
- Subprocess - For managing processes
- Re - For working with regular expressions in Python
- Typing - Provides type hints and static type checking
- Python Minify - To make Python code smaller
- Python Compiler - To run Python code
- File.io - To share files
- Reduced File Size: Smaller files lead to improved performance and faster load times.
- Bandwidth Optimization: Minified code requires less bandwidth, enhancing overall efficiency.
- Code Protection: Minification makes the code harder to read, providing a basic level of intellectual property protection.
- Improved Performance: Faster loading times lead to quicker execution of models and algorithms.
- Faster Load Times: Enhances user experience by ensuring applications load swiftly.
- Reduced Resource Consumption: Lowers CPU and GPU utilization, freeing resources for intensive tasks.
- Enhanced Caching: Improves caching efficiency for frequently updated data.
- Improved Mobile Performance: Ensures smooth operation on resource-constrained mobile devices.
- Streamlined Deployment: Simplifies deployment of applications with continuous learning.
- Faster Compilation Times: Accelerates development cycles for quick experimentation.
- Better Integration with Microservices: Facilitates smoother integration in microservices architectures.
- Optimized Data Pipeline Performance: Enhances speed in data processing pipelines.
- Enhanced Scalability: Allows applications to scale better under high loads.
- Reduced Latency in Distributed Systems: Decreases response time in distributed AI systems.
- Improved Energy Efficiency: Lowers energy consumption in data centers handling AI workloads.
To set up and run Python Minifier:
- Node.js (version 18.0 or newer)
- npm (usually comes with Node.js)
- Git (version control system)
- Python (version 3.11 or newer)
- Pip Python package installer
- Clone the repository:
git clone https://github.com/glad432/glad432.github.io.git
cd glad432.github.io
- Install dependencies:
npm install
- Remember to update the base URL in the vite.config.js and the API URLs in script.js from the next step.
The replace-urls
command updates specific URLs in your project files for local development. It uses the replace-in-file
utility to make the following replacements:
-
In
./js/script.js
:- Replace
https://python-compile.vercel.app
withhttp://127.0.0.1:5000
- Replace
https://python-minify.vercel.app
withhttp://127.0.0.1:5001
- Replace
-
In
./vite.config.js
:- Replace
https://glad432.github.io/
with/
- Replace
Run the command with:
npm run replace-urls
The pip-install
command installs required Python packages from two requirements.txt
files:
npm run pip-install
To start working on the project:
npm run start-dev
This starts the development server. Open your web browser and go to http://localhost:5173
(or the address shown in your terminal) to see the app.
To make the project ready for release:
npm run build
This creates optimized files in the dist
folder.
To see how the release version looks:
npm run start-preview
You can use this under the MIT License. See LICENSE for more details.
Thanks for checking out Python Minifier - Glad432. We'd love to hear what you think and welcome any help to make it better!