jviide / Htm.py
Licence: mit
JSX-like syntax in plain Python
Stars: ✭ 102
Programming Languages
Labels
Projects that are alternatives of or similar to Htm.py
Vscode Glean
The extension provides refactoring tools for your React codebase
Stars: ✭ 1,194 (+1070.59%)
Mutual labels: jsx
Sax Wasm
The first streamable, fixed memory XML, HTML, and JSX parser for WebAssembly.
Stars: ✭ 89 (-12.75%)
Mutual labels: jsx
Askama
Type-safe, compiled Jinja-like templates for Rust
Stars: ✭ 1,255 (+1130.39%)
Mutual labels: templating
React Atomic Structure
Basic Structure for React app following Atomic Design
Stars: ✭ 89 (-12.75%)
Mutual labels: jsx
Gomplate
A flexible commandline tool for template rendering. Supports lots of local and remote datasources.
Stars: ✭ 1,270 (+1145.1%)
Mutual labels: templating
Babel Plugin React Persist
Automatically useCallback() & useMemo(); memoize inline functions
Stars: ✭ 91 (-10.78%)
Mutual labels: jsx
Karet
Karet is a library that allows you to embed Kefir observables into React VDOM
Stars: ✭ 81 (-20.59%)
Mutual labels: jsx
Metalsmith React Templates
A metalsmith plugin to render files using React / Preact / JSX based templates.
Stars: ✭ 90 (-11.76%)
Mutual labels: templating
Kit
Tools for developing, documenting, and testing React component libraries
Stars: ✭ 1,201 (+1077.45%)
Mutual labels: jsx
Dataformsjs
🌟 DataFormsJS 🌟 A minimal JavaScript Framework and standalone React and Web Components for rapid development of high quality websites and single page applications.
Stars: ✭ 95 (-6.86%)
Mutual labels: jsx
Jsx Ast Utils
AST utility module for statically analyzing JSX
Stars: ✭ 89 (-12.75%)
Mutual labels: jsx
Scriban
A fast, powerful, safe and lightweight scripting language and engine for .NET
Stars: ✭ 1,360 (+1233.33%)
Mutual labels: templating
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.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].