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.

Filename, size & hash SHA256 hash help File type Python version Upload date
amp_tools-0.0.3-py2.py3-none-any.whl (5.9 kB) Copy SHA256 hash SHA256 Wheel py2.py3
amp_tools-0.0.3.tar.gz (5.3 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page