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).
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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for generate_html-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f5c12cd5d642db842906f08a7555309944ecc519a87c7c817b75794aee48098c |
|
MD5 | 00b5761db58bf8c03a1b7dafb6f5db3d |
|
BLAKE2b-256 | cd3b80593c21ab05146d41a472362637cb39a2282017ba1043f464f57c6750f8 |