Name | tagic JSON |
Version |
1.2.0
JSON |
| download |
home_page | https://github.com/tammoippen/tagic |
Summary | Build html / xhtml with a nice syntax. |
upload_time | 2024-11-22 08:56:51 |
maintainer | None |
docs_url | None |
author | Tammo Ippen |
requires_python | <4.0,>=3.11 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
[![CI](https://github.com/tammoippen/tagic/actions/workflows/CI.yml/badge.svg)](https://github.com/tammoippen/tagic/actions/workflows/CI.yml)
[![PyPi version](https://img.shields.io/pypi/v/tagic.svg)](https://pypi.python.org/pypi/tagic)
[![Python Versions](https://img.shields.io/badge/python-3.11-brightgreen.svg)](https://img.shields.io/badge/python-3.11-brightgreen.svg)
[![Downloads](https://static.pepy.tech/badge/tagic/month)](https://pepy.tech/project/tagic)
[![codestyle black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
# tagic
Build html / xhtml with a nice syntax.
## Goals
- generate html / xhtml with a nice syntax
- have typing support
- have editor support for arguments, I used MDN as a reference.
- KISS: no more than generation
## Install
```sh
> pip install tagic
```
## Example
```py
from tagic.html import *
print(
html[
head[
title["Example Website"],
meta(
name="description",
content="This is an example website build with tagic",
),
],
body[
header(id="header")[h1["Awesome"]],
main[p["Some text ", span["with tags"], "in between"]],
footer(hidden=True),
],
].render(indent=True)
)
```
Will return
```html
<!DOCTYPE html>
<html>
<head>
<title>
Example Website
</title>
<meta content="This is an example website build with tagic" name="description" />
</head>
<body>
<header id="header">
<h1>
Awesome
</h1>
</header>
<main>
<p>
Some text
<span>
with tags
</span>
in between
</p>
</main>
<footer hidden>
</footer>
</body>
</html>
```
## Similar Projects
- [dominate](https://github.com/Knio/dominate): missing the typing support and editor support for arguments
- [domonic](https://github.com/byteface/domonic): to broad of a scope, with parsing, js and style and queries.
- [domini](https://gitlab.com/deepadmax/domini): missing editor support for arguments
- [htmler](https://github.com/ashep/htmler): missing the typing support and editor support for arguments
- [PyHTML](https://github.com/cenkalti/pyhtml): missing the typing support and editor support for arguments
- [pyhtmlgen](https://github.com/danvran/pyhtmlgen): incomplete
- [html](https://pypi.org/project/html/): i do not like syntax and missing the typing support and editor support for arguments
- [MarkupPy](https://github.com/tylerbakke/MarkupPy)
- [yattag](https://www.yattag.org/): i do not like syntax
- [py-microhtml](https://github.com/elonen/py_microhtml): funny tag names and no editor support for arguments
- [py3html](https://github.com/ozcanyarimdunya/py3html): no editor support for arguments
- [fast-html](https://github.com/pcarbonn/fast_html)
- [py2html](https://github.com/am230/py2html) not in pypi, but i like the syntax and took inspiration
Raw data
{
"_id": null,
"home_page": "https://github.com/tammoippen/tagic",
"name": "tagic",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.11",
"maintainer_email": null,
"keywords": null,
"author": "Tammo Ippen",
"author_email": "tammo.ippen@posteo.de",
"download_url": "https://files.pythonhosted.org/packages/9b/a7/b5ec5204b593e77c8709914d9a21031f82976df9446e8182f8cdd83fcf4f/tagic-1.2.0.tar.gz",
"platform": null,
"description": "[![CI](https://github.com/tammoippen/tagic/actions/workflows/CI.yml/badge.svg)](https://github.com/tammoippen/tagic/actions/workflows/CI.yml)\n[![PyPi version](https://img.shields.io/pypi/v/tagic.svg)](https://pypi.python.org/pypi/tagic)\n[![Python Versions](https://img.shields.io/badge/python-3.11-brightgreen.svg)](https://img.shields.io/badge/python-3.11-brightgreen.svg)\n[![Downloads](https://static.pepy.tech/badge/tagic/month)](https://pepy.tech/project/tagic)\n[![codestyle black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n# tagic\n\nBuild html / xhtml with a nice syntax.\n\n## Goals\n\n- generate html / xhtml with a nice syntax\n- have typing support\n- have editor support for arguments, I used MDN as a reference.\n- KISS: no more than generation\n\n## Install\n\n```sh\n> pip install tagic\n```\n\n## Example\n\n```py\nfrom tagic.html import *\n\nprint(\n html[\n head[\n title[\"Example Website\"],\n meta(\n name=\"description\",\n content=\"This is an example website build with tagic\",\n ),\n ],\n body[\n header(id=\"header\")[h1[\"Awesome\"]],\n main[p[\"Some text \", span[\"with tags\"], \"in between\"]],\n footer(hidden=True),\n ],\n ].render(indent=True)\n)\n```\n\nWill return\n\n```html\n<!DOCTYPE html>\n<html>\n <head>\n <title>\n Example Website\n </title>\n <meta content=\"This is an example website build with tagic\" name=\"description\" />\n </head>\n <body>\n <header id=\"header\">\n <h1>\n Awesome\n </h1>\n </header>\n <main>\n <p>\n Some text\n <span>\n with tags\n </span>\n in between\n </p>\n </main>\n <footer hidden>\n\n </footer>\n </body>\n</html>\n```\n\n## Similar Projects\n\n- [dominate](https://github.com/Knio/dominate): missing the typing support and editor support for arguments\n- [domonic](https://github.com/byteface/domonic): to broad of a scope, with parsing, js and style and queries.\n- [domini](https://gitlab.com/deepadmax/domini): missing editor support for arguments\n- [htmler](https://github.com/ashep/htmler): missing the typing support and editor support for arguments\n- [PyHTML](https://github.com/cenkalti/pyhtml): missing the typing support and editor support for arguments\n- [pyhtmlgen](https://github.com/danvran/pyhtmlgen): incomplete\n- [html](https://pypi.org/project/html/): i do not like syntax and missing the typing support and editor support for arguments\n- [MarkupPy](https://github.com/tylerbakke/MarkupPy)\n- [yattag](https://www.yattag.org/): i do not like syntax\n- [py-microhtml](https://github.com/elonen/py_microhtml): funny tag names and no editor support for arguments\n- [py3html](https://github.com/ozcanyarimdunya/py3html): no editor support for arguments\n- [fast-html](https://github.com/pcarbonn/fast_html)\n- [py2html](https://github.com/am230/py2html) not in pypi, but i like the syntax and took inspiration\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Build html / xhtml with a nice syntax.",
"version": "1.2.0",
"project_urls": {
"Homepage": "https://github.com/tammoippen/tagic"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9ba7b5ec5204b593e77c8709914d9a21031f82976df9446e8182f8cdd83fcf4f",
"md5": "1302d69d81e2364514117e2d25b0255d",
"sha256": "d7efc7e89e9f6453e8c09922c64c5fb24b00270d537d624244679aa941f47762"
},
"downloads": -1,
"filename": "tagic-1.2.0.tar.gz",
"has_sig": false,
"md5_digest": "1302d69d81e2364514117e2d25b0255d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.11",
"size": 13585,
"upload_time": "2024-11-22T08:56:51",
"upload_time_iso_8601": "2024-11-22T08:56:51.868044Z",
"url": "https://files.pythonhosted.org/packages/9b/a7/b5ec5204b593e77c8709914d9a21031f82976df9446e8182f8cdd83fcf4f/tagic-1.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-22 08:56:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tammoippen",
"github_project": "tagic",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "tagic"
}