htm.py

A Python version of developit/htm - JSX-like syntax in plain JavaScript Python.
Documentation
The main documentation of this module is located at https://jviide.github.io/htm.py/.
Installation
$ pip3 install htm
Usage
from htm import htm
@htm
def html(tag, props, children):
return tag, props, children
a = 1
b = {"bar": 100}
c = "span"
d = "world"
html("""
<div foo={a+2} ...{b}>
<{c}>Hello, {d}!<//>
</div>
""")
# ('div', {'foo': 3, 'bar': 100}, [('span', {}, ['Hello,', 'world', '!'])])
Development
To install locally:
$ pip install -e .
If you want to run tests and build the Sphinx docs and their examples...that runs into a problem with hyperpython's transitive dependencies. Thus:
$ pip install toolz
$ pip install sidekick
$ pip install -e .[docs]
Running Tests
$ python3 -m unittest discover -s tests
Building Docs
Documentation is available in the docs directory.
First install the dependencies then build the docs:
$ pip install -e .[docs]
$ cd docs
$ sphinx-build -b html . _build
License
This library is licensed under the MIT license. See ./LICENSE.
Metadata
Release files for htm 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| htm-0.1.1.tar.gz | 4.0 kB | Without provenance | Details for htm-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| htm-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for htm-0.1.1-py3-none-any.whl |
Total release size: 8.9 kB
Release files / htm-0.1.1.tar.gz
| Download URL | htm-0.1.1.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
16c4022baf8c2d41efa20b707d9559190456469c2d5545440559e4599cd95631
|
|
BLAKE2b-256 checksum How to use checksums |
e79193b5027557bfee2879c37c8f4f3984f701040900c4d3580a7d11ea2c342c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.4.0 requests-toolbelt/0.8.0 tqdm/4.32.2 CPython/3.7.7
|
Release files / htm-0.1.1-py3-none-any.whl
| Download URL | htm-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7917b83997828e09f0808e3a70d4e873dc9a491552effff63fae91295aa4e14b
|
|
BLAKE2b-256 checksum How to use checksums |
6fd11c8efe8ade35f95fa30246f4eea254527166aca930fdc68ea78f05604cb6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.4.0 requests-toolbelt/0.8.0 tqdm/4.32.2 CPython/3.7.7
|
Security for htm 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.