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.2.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for amp_tools-0.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93990ae97d50c7fe1795705419f37d0df7490b95412af5c60637b8dfb8756746 |
|
MD5 | 9b2292bc646eaab8ff39387da25582ad |
|
BLAKE2b-256 | 820c97a5acb3f03e46f23eb702c3f7313189be1427198e085ad0aa670a4428d6 |