Metadata-Version: 2.4
Name: domilite
Version: 0.1.3
Summary: A Python library for creating and manipulating HTML elements.
Project-URL: Documentation, https://github.com/alexrudy/domilite#readme
Project-URL: Issues, https://github.com/alexrudy/domilite/issues
Project-URL: Source, https://github.com/alexrudy/domilite
Author-email: Alex Rudy <github@alexrudy.net>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Text Processing
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: markupsafe>=3.0.2
Description-Content-Type: text/markdown

# Domilite

[![PyPI - Version](https://img.shields.io/pypi/v/domilite.svg)](https://pypi.org/project/domilite)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/domilite.svg)](https://pypi.org/project/domilite)
[![Tests](https://github.com/alexrudy/domilite/workflows/Tests/badge.svg)](https://github.com/alexrudy/domilite/workflows/Tests/)
[![Docs](https://img.shields.io/readthedocs/domilite)](https://domilite.readthedocs.io/en/latest/)

[Domilite][] is a lightweight (0-dependency) Python library for creating and manipulating HTML elements.

It takes inspiration from [dominate][], a great library for creating HTML elements in Python. Domilite aims to simplify the interface from [dominate][], providing a smaller set of APIs while maintaining general compatibility with the library.

Create HTML elements from code, and render them formatted:
```python
from domilite import tags

html = tags.html(tags.head(tags.title('welcome')))
html.add(tags.body(tags.h1('welcome to domilite', id='title')))
html[1].classes.add('style-from-code')
print(html)
```

This produces

```html
<html>
  <head><title>welcome</title></head>
  <body class="style-from-code">
    <h1 id="title">welcome to domilite</h1>
  </body>
</html>
```

You can find the docs at <https://domilite.readthedocs.io/en/latest/>

[dominate]: https://github.com/Knio/dominate
[Domilite]: https://domilite.readthedocs.io/en/latest/
