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
> pip install tagic
Example
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
<!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: missing the typing support and editor support for arguments
- domonic: to broad of a scope, with parsing, js and style and queries.
- domini: missing editor support for arguments
- htmler: missing the typing support and editor support for arguments
- PyHTML: missing the typing support and editor support for arguments
- pyhtmlgen: incomplete
- html: i do not like syntax and missing the typing support and editor support for arguments
- MarkupPy
- yattag: i do not like syntax
- py-microhtml: funny tag names and no editor support for arguments
- py3html: no editor support for arguments
- fast-html
- py2html not in pypi, but i like the syntax and took inspiration
Metadata
Release files for tagic 1.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tagic-1.5.0.tar.gz | 13.7 kB | Without provenance | Details for tagic-1.5.0.tar.gz |
Release files / tagic-1.5.0.tar.gz
| Download URL | tagic-1.5.0.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c9d10f9bd4cb14f2e28d2b1f41756c8d515409b03e8b58d2be96fe8677a260e
|
|
BLAKE2b-256 checksum How to use checksums |
3b0cca8c224781120340394cfdbaf3c7c40c6ecd0362093000dd1ada75bd6583
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.11.15 Linux/6.17.0-1015-azure
|
Security for tagic 1.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.