# `<PyHTML/>`
A library for building HTML documents with a simple and learnable syntax,
inspired by (and similar to)
[Cenk Altı's PyHTML library](https://github.com/cenkalti/pyhtml), but
with improved documentation and type safety.
Learn more by reading [the documentation](https://comp1010unsw.github.io/pyhtml-enhanced/).
## Features
* Inline documentation and type safety for all tags.
* Editor support for many common tags (attribute suggestions).
* A modern and readable codebase.
* 100% test coverage.
## Usage
```py
>>> import pyhtml as p
>>> my_website = p.html(
... p.head(
... p.title("Hello, world!"),
... p.script(src="http://example.com/script.js"),
... ),
... p.body(
... p.h1("Hello, world!"),
... p.p("This is my amazing website!"),
... ),
... )
>>> print(str(my_website))
<!DOCTYPE html>
<html>
<head>
<title>
Hello, world!
</title>
<script type="text/javascript" src="http://example.com/script.js"></script>
</head>
<body>
<h1>
Hello, world!
</h1>
<p>This is my amazing website!</p>
</body>
</html>
```
Raw data
{
"_id": null,
"home_page": "https://comp1010unsw.github.io/pyhtml-enhanced/",
"name": "pyhtml-enhanced",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "html, template, pyhtml, markup, documentation",
"author": "Maddy Guthridge",
"author_email": "maddy.guthridge@unsw.edu.au",
"download_url": "https://files.pythonhosted.org/packages/33/9b/1bb762446059eb74343c8c682617b95bbaf92600c31d023a3c8c47e4bd6a/pyhtml_enhanced-2.2.2.tar.gz",
"platform": null,
"description": "# `<PyHTML/>`\n\nA library for building HTML documents with a simple and learnable syntax,\ninspired by (and similar to)\n[Cenk Alt\u0131's PyHTML library](https://github.com/cenkalti/pyhtml), but\nwith improved documentation and type safety.\n\nLearn more by reading [the documentation](https://comp1010unsw.github.io/pyhtml-enhanced/).\n\n## Features\n\n* Inline documentation and type safety for all tags.\n\n* Editor support for many common tags (attribute suggestions).\n\n* A modern and readable codebase.\n\n* 100% test coverage.\n\n## Usage\n\n```py\n>>> import pyhtml as p\n>>> my_website = p.html(\n... p.head(\n... p.title(\"Hello, world!\"),\n... p.script(src=\"http://example.com/script.js\"),\n... ),\n... p.body(\n... p.h1(\"Hello, world!\"),\n... p.p(\"This is my amazing website!\"),\n... ),\n... )\n>>> print(str(my_website))\n<!DOCTYPE html>\n<html>\n <head>\n <title>\n Hello, world!\n </title>\n <script type=\"text/javascript\" src=\"http://example.com/script.js\"></script>\n </head>\n <body>\n <h1>\n Hello, world!\n </h1>\n <p>This is my amazing website!</p>\n </body>\n</html>\n\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A library for building HTML documents with a simple and learnable syntax",
"version": "2.2.2",
"project_urls": {
"Bug Tracker": "https://github.com/COMP1010UNSW/pyhtml-enhanced/issues",
"Documentation": "https://comp1010unsw.github.io/pyhtml-enhanced/",
"Homepage": "https://comp1010unsw.github.io/pyhtml-enhanced/",
"Repository": "https://github.com/COMP1010UNSW/pyhtml-enhanced"
},
"split_keywords": [
"html",
" template",
" pyhtml",
" markup",
" documentation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "568afa96fd7aa68acf237c9238d958525addb22ed7fa0e538943d28257bd78cb",
"md5": "b58b806dd97e999a2c8f1d1a53101e1d",
"sha256": "6da369ac14657fe34c5179eece2a8000c989fbffb2105f082a4ccc74ea69a4db"
},
"downloads": -1,
"filename": "pyhtml_enhanced-2.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b58b806dd97e999a2c8f1d1a53101e1d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 38020,
"upload_time": "2025-02-14T04:55:33",
"upload_time_iso_8601": "2025-02-14T04:55:33.753416Z",
"url": "https://files.pythonhosted.org/packages/56/8a/fa96fd7aa68acf237c9238d958525addb22ed7fa0e538943d28257bd78cb/pyhtml_enhanced-2.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "339b1bb762446059eb74343c8c682617b95bbaf92600c31d023a3c8c47e4bd6a",
"md5": "a5e18e659d53069996c16817895a92ac",
"sha256": "972752a8d3cdbadf2237c6d9925509710cc2325943c856589f59462155190445"
},
"downloads": -1,
"filename": "pyhtml_enhanced-2.2.2.tar.gz",
"has_sig": false,
"md5_digest": "a5e18e659d53069996c16817895a92ac",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 32828,
"upload_time": "2025-02-14T04:55:35",
"upload_time_iso_8601": "2025-02-14T04:55:35.491976Z",
"url": "https://files.pythonhosted.org/packages/33/9b/1bb762446059eb74343c8c682617b95bbaf92600c31d023a3c8c47e4bd6a/pyhtml_enhanced-2.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-14 04:55:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "COMP1010UNSW",
"github_project": "pyhtml-enhanced",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pyhtml-enhanced"
}