Flask压缩Html
Project description
Flask-Hmin
安装
使用pip
进行安装:
pip install Flask-Hmin
或者使用pipenv
:
pipenv install Flask-Hmin
或者使用poetry
:
poetry add Flask-Hmin
您也可以下载存储库并手动安装它,执行以下操作:
git clone https://github.com/zhenzi0322/Flask-Hmin.git
cd Flask-Hmin
python setup.py install
使用方法
from flask import Flask, render_template
from flask_hmin import HMin
app = Flask(__name__)
app.config["HMIN_COMPRESS_HTML"] = True
hmin = HMin(app=app)
@app.route("/")
@hmin.compress
def home():
return render_template("index.html")
if __name__ == '__main__':
app.run()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Flask-Hmin-1.0.0.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for Flask_Hmin-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19908e5badfe12084340b79a3915c2bf360780f3eb77c129bfa94ca7c71386ff |
|
MD5 | 8d95ed4de04b5af2c56338f94da21041 |
|
BLAKE2b-256 | 31aa500684fba6910b45bb867334b52c86cbffdf3618250cc1fe5923ddbf0661 |