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.4.tar.gz
(5.6 kB
view details)
Built Distribution
File details
Details for the file amp_tools-0.0.4.tar.gz
.
File metadata
- Download URL: amp_tools-0.0.4.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
2538a2d54b17f8d05948121f758ad92c20822183876d446ccd3b9804f141287d
|
|
MD5 |
8929134cd392743e53fbb664a51b1446
|
|
BLAKE2b-256 |
bc02950155eaa99ee5437e61eb27259b874ac2a7a331900813157d18bd8fcf29
|
File details
Details for the file amp_tools-0.0.4-py2.py3-none-any.whl
.
File metadata
- Download URL: amp_tools-0.0.4-py2.py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
bee62f5efb4379d603a390e87735780869ebb0f3df46f1621c49f7e3e32f5896
|
|
MD5 |
5ea860e6163381642a1fcedbb02b0ebe
|
|
BLAKE2b-256 |
043485a210b9bc36f0b0465fc9799efae94de62ecb93626acf95b9f19f44d91e
|