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>'
Metadata
Release files for amp-tools 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| amp_tools-0.0.4.tar.gz | 5.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| amp_tools-0.0.4-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 11.5 kB
Release files / amp_tools-0.0.4.tar.gz
| Download URL | amp_tools-0.0.4.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2538a2d54b17f8d05948121f758ad92c20822183876d446ccd3b9804f141287d
|
|
BLAKE2b-256 checksum How to use checksums |
bc02950155eaa99ee5437e61eb27259b874ac2a7a331900813157d18bd8fcf29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / amp_tools-0.0.4-py2.py3-none-any.whl
| Download URL | amp_tools-0.0.4-py2.py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
bee62f5efb4379d603a390e87735780869ebb0f3df46f1621c49f7e3e32f5896
|
|
BLAKE2b-256 checksum How to use checksums |
043485a210b9bc36f0b0465fc9799efae94de62ecb93626acf95b9f19f44d91e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|