html5witch offers Pythonic HTML5 generation based on xmlwitch
Project description
html5witch offers Pythonic HTML5 generation based on xmlwitch. BSD-licensed.
Usage
>>> import html5witch >>> doc = html5witch.Builder() >>> with doc.html: ... with doc.head: ... doc.title('Title') ... with doc.body: ... doc.p('Hello World') ... with doc.form(action="/", method="post"): ... doc.input(type="input", name="my_input_field") ... >>> print(doc) <!doctype html> <html> <head> <meta charset="utf-8"> <title>Title</title> </head> <body> <p>Hello World</p> <form action="/" method="post"> <input type="input" name="my_input_field"> </form> </body> </html>
Setup
$ pip install html5witch # or $ easy_install html5witch # or $ cd xmlwitch-0.2.1; python setup.py install $ cd html5witch-0.2.1; python setup.py install
Links
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
html5witch-0.2.1.tar.gz
(4.3 kB
view details)
File details
Details for the file html5witch-0.2.1.tar.gz
.
File metadata
- Download URL: html5witch-0.2.1.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f66b3fb13ef9050170769afd5c1a6b293b1ffe04f25c95caafef96f049c9c25e |
|
MD5 | d210a1bd16fd34be2db484ba53cf3b4c |
|
BLAKE2b-256 | 67c92101a42f5fe10231047a353a2346ada97f8aa5609889ec3cb91b45db71f3 |