Socket
Socket
Sign inDemoInstall

amp-tools

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amp-tools

Python AMP Library


Maintainers
1

Python AMP Library

Build Status codecov PyPI version made-with-python

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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc