Python AMP Library
Project description
Python AMP Library
This library contains class what converts html to AMP.
Work in progress
Installation
pip install amp_tools
Usage example
from amp_tools import TransformHtmlToAmp
html_elements = '<span class="test-class">' \
'<form class="form-test"></form>' \
'<img src="media/test.png" width="300" height="220">' \
'</span>'
valid_amp = TransformHtmlToAmp(html_elements)()
# Return
b'<div class="amp-text"><amp-img src="media/test.png" width="300" height="220" layout="responsive"></amp-img></div>'
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
amp_tools-0.0.4.tar.gz
(5.6 kB
view hashes)
Built Distribution
Close
Hashes for amp_tools-0.0.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bee62f5efb4379d603a390e87735780869ebb0f3df46f1621c49f7e3e32f5896 |
|
MD5 | 5ea860e6163381642a1fcedbb02b0ebe |
|
BLAKE2b-256 | 043485a210b9bc36f0b0465fc9799efae94de62ecb93626acf95b9f19f44d91e |