roniemartinez / flask-inliner

Flask-Inliner converts CSS <style> blocks to inline style attributes

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flask-Inliner

Flask-Inliner converts CSS <style> blocks to inline style attributes

Installation

Using pip

pip install flask-inliner

Manual installation

Download from https://github.com/Code-ReaQtor/flask-inliner/releases

python setup.py install

Example

from flask import Flask
from flask_inliner import Inliner
app = Flask(__name__)
Inliner(app)


@app.route('/')
def hello_world():
    return '<html><head><style>h1 { color:#ffcc00; }</style></head><body><h1>Hello World!</h1></body></html>'

if __name__ == '__main__':
    app.run()

About

Flask-Inliner converts CSS <style> blocks to inline style attributes

License:MIT License


Languages

Language:Python 100.0%