A powerful HTML whitespace remover for python
Project description
HTML Whitespace remover for Python
Introduction :
A powerful tool to optimize HTML
Why use “python_stip_whitespace” ?
Adds line break to InlineJS.
It can automagically minify inline CSS, JS.
Removes <!–prettier-ignore–> from HTML.
It speeds up website by reducing the HTML size.
It compiles regex at runtime. So it’s blazing fast.
Its mostly based on C ( gzip ) and Rust ( minify-html ) libraries.
Significantly lower bytes transferred when working with frameworks like AlpineJs ( Almost fully working & Please open a issue in the Issue Tracker if you encounter any bug) & Petite Vue.
Is very customizable. ( You can configure lower level minify-html rust bindings and also the lower level python bindings from .env files )
Why souldn’t you use python_stip_whitespace ?
Adds unnecessary ‘;;’ in HTML. ( If you know any regex to fix this please put a pull request )
Although I tried my best to use Compiled Language for Optimizations. It can still be sub miliseconds ( > 0.001 ) slower compared to normal Django Rendering. ( If you know any way to improve performance, please put a pull request )
Requirements :
minify-html
python-dotenv
Python 3 ( Should work with all version? )
Brotli ( or BrotliPy ) | ( Optional )
ZSTD ( Optional )
User guide :
Contributing :
If you like this project add a star. If you have problems or suggestions please put them in the Issue Tracker. If you like to add features. Fork this repo and submit a Pull Request. 😛
Roadmap :
You tell me. If i have free time, I will implement it.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file python_strip_whitespace-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: python_strip_whitespace-0.0.3-py3-none-any.whl
- Upload date:
- Size: 26.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ec1067bfb4847ce92ab83488fd840833fe425c0f00f07aeed70493d6099a5c6 |
|
MD5 | bd889bbb23c40bbb4f9e5b53fc72048a |
|
BLAKE2b-256 | e07e61ae2bc4916334787188b46a40144c9fe84f7f0e94994f5218248ae83961 |