a minimalist python html template lib
Project description
kTemplate
a minimalist python html template
Quick Start
Installation
pip install kTemplate
Example
from kTemplate import (
div, img, # common html elements
element # for creating custom element
)
# create common html element
# `class` represents by `cls` due to python keyword
html_str = div(img(src='url'), cls='bar')
# -> <div class="bar"><img src="url"/></div>
# create custom element
my_element = element(tag="MyElement", content="foo" props="bar")
# -> <MyElement props="ar">foo</MyElement>
Documentation
Please refer the docs for more about:
- why creating this package
- usage details
- function references
- contributing guideline
- testing
- changelog
Need Help?
Open a github issue or ping me on Twitter
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ktemplate-0.1.0.tar.gz
(6.0 kB
view hashes)
Built Distribution
Close
Hashes for ktemplate-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea228b33392c62d0fe1b7c5b109806d567a3ac0f397f14d0a8edaaaffac3f31f |
|
MD5 | 90c5d3c4d65a28b79a8b76e23c5b9be0 |
|
BLAKE2b-256 | 35cc6f3f1c0a9a3cd54b61052954650f4d0a51a8d4d7920b5db22a13142b020f |