ktemplate


Namektemplate JSON
Version 0.3.2 PyPI version JSON
download
home_pagehttps://hoishing.github.io/kTemplate
Summarya minimalist python html template lib
upload_time2023-02-03 03:18:17
maintainer
docs_urlNone
authorKelvin Ng
requires_python>=3.10,<4.0
licenseMIT
keywords template html jinja
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # kTemplate

[![ci-badge]][ci-url] [![coverage-badge]][coverage-url] [![pypi-badge]][pypi-url] [![py-version]][py-url] [![MIT-badge]][MIT-url] [![black-badge]][black-url]

> a minimalist python html template

## Quick Start

### Installation

`pip install kTemplate`

### Examples

```python
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>
```

Please refer to the docs for creating HTML [templates and components][components]

## 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](https://github.com/hoishing/kTemplate/issues) or ping me on [Twitter](https://twitter.com/hoishing) ![](https://api.iconify.design/logos/twitter.svg?width=20)

[ci-badge]: https://github.com/hoishing/kTemplate/actions/workflows/ci.yml/badge.svg
[ci-url]: https://github.com/hoishing/kTemplate/actions/workflows/ci.yml
[coverage-badge]: https://hoishing.github.io/kTemplate/assets/coverage-badge.svg
[coverage-url]: https://hoishing.github.io/kTemplate/assets/coverage/
[MIT-badge]: https://img.shields.io/github/license/hoishing/kTemplate
[MIT-url]: https://opensource.org/licenses/MIT
[pypi-badge]: https://img.shields.io/pypi/v/ktemplate
[pypi-url]: https://pypi.org/project/ktemplate/
[black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg
[black-url]: https://github.com/psf/black
[py-version]: https://img.shields.io/pypi/pyversions/kTemplate
[py-url]: https://python.org
[docs]: https://hoishing.github.io/kTemplate/
[why]: https://hoishing.github.io/kTemplate/why
[usage]: https://hoishing.github.io/kTemplate/usage
[components]: https://hoishing.github.io/kTemplate/usage/#templates-and-components
[references]: https://hoishing.github.io/kTemplate/ref
[contributing]: https://hoishing.github.io/kTemplate/contribute/
[testing]: https://hoishing.github.io/kTemplate/contribute/#testing
[changelog]: https://hoishing.github.io/kTemplate/changelog

            

Raw data

            {
    "_id": null,
    "home_page": "https://hoishing.github.io/kTemplate",
    "name": "ktemplate",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "template,html,jinja",
    "author": "Kelvin Ng",
    "author_email": "hoishing@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/c8/4c/984d7dd7679cfadc7addec2f4bc33c50424285472ac58db77a74bbfa3569/ktemplate-0.3.2.tar.gz",
    "platform": null,
    "description": "# kTemplate\n\n[![ci-badge]][ci-url] [![coverage-badge]][coverage-url] [![pypi-badge]][pypi-url] [![py-version]][py-url] [![MIT-badge]][MIT-url] [![black-badge]][black-url]\n\n> a minimalist python html template\n\n## Quick Start\n\n### Installation\n\n`pip install kTemplate`\n\n### Examples\n\n```python\nfrom kTemplate import (\n  div, img, # common html elements\n  element   # for creating custom element\n)\n\n# create common html element\n# `class` represents by `cls` due to python keyword\nhtml_str = div(img(src='url'), cls='bar')\n# -> <div class=\"bar\"><img src=\"url\"/></div>\n\n# create custom element\nmy_element = element(tag=\"MyElement\", content=\"foo\" props=\"bar\")\n# -> <MyElement props=\"ar\">foo</MyElement>\n```\n\nPlease refer to the docs for creating HTML [templates and components][components]\n\n## Documentation\n\nPlease refer the [docs] for more about:\n\n- [why] creating this package\n- [usage] details\n- function [references]\n- [contributing] guideline\n- [testing]\n- [changelog]\n\n## Need Help?\n\nOpen a [github issue](https://github.com/hoishing/kTemplate/issues) or ping me on [Twitter](https://twitter.com/hoishing) ![](https://api.iconify.design/logos/twitter.svg?width=20)\n\n[ci-badge]: https://github.com/hoishing/kTemplate/actions/workflows/ci.yml/badge.svg\n[ci-url]: https://github.com/hoishing/kTemplate/actions/workflows/ci.yml\n[coverage-badge]: https://hoishing.github.io/kTemplate/assets/coverage-badge.svg\n[coverage-url]: https://hoishing.github.io/kTemplate/assets/coverage/\n[MIT-badge]: https://img.shields.io/github/license/hoishing/kTemplate\n[MIT-url]: https://opensource.org/licenses/MIT\n[pypi-badge]: https://img.shields.io/pypi/v/ktemplate\n[pypi-url]: https://pypi.org/project/ktemplate/\n[black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg\n[black-url]: https://github.com/psf/black\n[py-version]: https://img.shields.io/pypi/pyversions/kTemplate\n[py-url]: https://python.org\n[docs]: https://hoishing.github.io/kTemplate/\n[why]: https://hoishing.github.io/kTemplate/why\n[usage]: https://hoishing.github.io/kTemplate/usage\n[components]: https://hoishing.github.io/kTemplate/usage/#templates-and-components\n[references]: https://hoishing.github.io/kTemplate/ref\n[contributing]: https://hoishing.github.io/kTemplate/contribute/\n[testing]: https://hoishing.github.io/kTemplate/contribute/#testing\n[changelog]: https://hoishing.github.io/kTemplate/changelog\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "a minimalist python html template lib",
    "version": "0.3.2",
    "split_keywords": [
        "template",
        "html",
        "jinja"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bd21ddcfde36dba830fc562536b360fbdc26e4294954b7551aa8cd10f3d1851b",
                "md5": "f50ad39f1461b1e7dad4bbd0fcca7472",
                "sha256": "76c66f18492a0da93ed16f0f8e3b9b9c8f65c057abfe9f733a17807ba71f74ca"
            },
            "downloads": -1,
            "filename": "ktemplate-0.3.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f50ad39f1461b1e7dad4bbd0fcca7472",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 7477,
            "upload_time": "2023-02-03T03:18:15",
            "upload_time_iso_8601": "2023-02-03T03:18:15.528226Z",
            "url": "https://files.pythonhosted.org/packages/bd/21/ddcfde36dba830fc562536b360fbdc26e4294954b7551aa8cd10f3d1851b/ktemplate-0.3.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c84c984d7dd7679cfadc7addec2f4bc33c50424285472ac58db77a74bbfa3569",
                "md5": "1cef8e094e44bdc90fd270ca69c1c2b5",
                "sha256": "ebbd55f8c5478cd5904bff79bf78f12958b7f862a92a54f61d24b6f38d5007d0"
            },
            "downloads": -1,
            "filename": "ktemplate-0.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "1cef8e094e44bdc90fd270ca69c1c2b5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 7114,
            "upload_time": "2023-02-03T03:18:17",
            "upload_time_iso_8601": "2023-02-03T03:18:17.175254Z",
            "url": "https://files.pythonhosted.org/packages/c8/4c/984d7dd7679cfadc7addec2f4bc33c50424285472ac58db77a74bbfa3569/ktemplate-0.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-03 03:18:17",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "ktemplate"
}
        
Elapsed time: 0.04273s