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.3.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for amp_tools-0.0.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b51e585880c27b45a090940e0114fc6b0201f24560427b4e160ca559f9fa783e |
|
MD5 | a08fb5d602b52bb999d416722de2dd3f |
|
BLAKE2b-256 | a603730d120a1c92df82618662c54bf08e9babdfe847d87064724f3f67ec1927 |