Skip to main content

Python AMP Library

Project description

Python AMP Library

Build Status codecov PyPI version

This library contains class what converts html to AMP.

Work in progress


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">' \

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.

Files for amp-tools, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size amp_tools-0.0.2.tar.gz (5.3 kB) File type Source Python version None Upload date Hashes View
Filename, size amp_tools-0.0.2-py2.py3-none-any.whl (7.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page