MIT License
The Vision library provides a simple and lightweight way to generate HTML content programmatically in Python. It allows you to create HTML elements, style them, and build complex HTML structures using a fluent interface.
TODO
Here's a simple example demonstrating how to use Vision to create an HTML document:
from vision import body, div, p, h1, Tag
from vision.context import Context
ctx = Context()
root = Tag(ctx, "html")
with root:
with body(ctx):
with div(ctx):
h1(ctx, "Welcome to MiniHTML")
p(ctx, "This is a simple HTML document generated using MiniHTML.")
print(root.render())
This will output:
<html>
<body>
<div>
<h1>Welcome to MiniHTML</h1>
<p>This is a simple HTML document generated using MiniHTML.</p>
</div>
</body>
</html>
Contributions are welcome! If you have any ideas for improvement or new features, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.