Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/baseplate-admin/python_strip_whitespace
HTML White space remover for Python Programming Language
https://github.com/baseplate-admin/python_strip_whitespace
html python3
Last synced: 22 days ago
JSON representation
HTML White space remover for Python Programming Language
- Host: GitHub
- URL: https://github.com/baseplate-admin/python_strip_whitespace
- Owner: baseplate-admin
- License: gpl-3.0
- Created: 2021-11-01T09:58:53.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-01T11:40:40.000Z (almost 2 years ago)
- Last Synced: 2024-10-13T09:41:25.561Z (about 1 month ago)
- Topics: html, python3
- Language: Python
- Homepage: https://pypi.org/project/python-strip-whitespace/
- Size: 135 KB
- Stars: 1
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
HTML Whitespace remover for Python
==================================
|Pepy.tech Badge| |PyPi Version Badge| |Python Versions Badge| |License Badge| |Code Style| |Lines of Code Badge|.. |Pepy.tech Badge| image:: https://static.pepy.tech/personalized-badge/python-strip-whitespace?period=week&units=international_system&left_color=grey&right_color=orange&left_text=Downloads
:target: https://pepy.tech/project/python-strip-whitespace.. |PyPi Version Badge| image:: https://badge.fury.io/py/python-strip-whitespace.svg
:target: https://badge.fury.io/py/python-strip-whitespace.. |Python Versions Badge| image:: https://img.shields.io/pypi/pyversions/python-strip-whitespace
:alt: PyPI - Python Version
:target: https://github.com/baseplate-admin/python_strip_whitespace/blob/main/setup.py.. |License Badge| image:: https://img.shields.io/pypi/l/python-strip-whitespace
:alt: PyPI - License
:target: https://github.com/baseplate-admin/python_strip_whitespace/blob/main/LICENSE
.. |Code Style| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:alt: Code Style
.. |Lines of Code Badge| image:: https://tokei.rs/b1/github/baseplate-admin/python_strip_whitespace
:alt: Lines of Code
:target: https://github.com/baseplate-admin/python_strip_whitespace
Introduction :
--------------
A powerful tool to optimize HTMLWhy use "python_stip_whitespace" ?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~* Adds line break to InlineJS.
* It can automagically minify inline CSS, JS.
* Removes 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 when calling minify )Why shouldn't you use python_stip_whitespace ?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Adds unnecessary ';;' in HTML. ( If you know any regex to fix this please put a pull request )Requirements :
--------------* `minify-html `__
* Python 3 ( Should work with all version? )
* `Brotli `_ ( or `BrotliPy `_ ) | ( Optional )
* `ZSTD `_ ( Optional ) ``Isn't supperted by modern browsers``Used Internally by :
====================
* `django-strip-whitespace `_
* `flask-strip-whitespace `_
* `fastapi-strip-whitespace `_ ( Doesn't exist 😛 )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.