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
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.2.0.tar.gz
(6.5 kB
view hashes)
Built Distribution
Close
Hashes for ktemplate-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8aeb3b8226b78eee5ded1b978595037ba1ca82a00544b904d8b492f118f2c8bc |
|
MD5 | ea6351f6597e3f022eddd3866d6ac148 |
|
BLAKE2b-256 | c89692e147d13f7dd98197ec14476fd2d80974990f12271236b58bc5da4bc098 |