Skip to main content

Generate HTML5 with Python generators

Project description

# generate-html

Generate HTML5 with pure Python.

## Usage

@document
def hello_world(h):
with h.p(class_='main'):
yield h.span(h.strong("Hello World!"), data_msg='greeting')

>>> print(to_html(hello_world()))
<!doctype html><p class="main"><span data-msg="greeting"><strong>Hello World!</strong></span></p>

## Installation

generate-html is distributed on [PyPI](https://pypi.org) as a universal
wheel and is available on Linux/macOS and Windows and supports
Python 3.5+ and PyPy.

$ pip install generate-html

## License

generate-html is distributed under the terms of the
[MIT License](https://choosealicense.com/licenses/mit).


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

generate-html-0.0.2.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

generate_html-0.0.2-py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page