Metadata-Version: 2.1
Name: pytohtml
Version: 1.0.0
Summary: Write HTML with Pythonic Code
Home-page: https://github.com/am230/pytohtml
Author: am230
Author-email: am.230@outlook.jp
License: MIT Licence
Keywords: html,pythonic
Platform: any
Requires: strbuilder
Requires: Flask
Requires: libsass
Description-Content-Type: text/x-rst
License-File: LICENSE

Writing XML with Pythonic code
==============================

.. image:: https://img.shields.io/github/license/mashape/apistatus.svg
   :target: http://opensource.org/licenses/MIT
.. image:: https://badge.fury.io/py/pytohtml.svg
    :target: https://badge.fury.io/py/pytohtml

Installation
------------

.. code:: bash

    $ pip install py-to-html

Example
-------

.. code:: python

    from py2html.elements import html, head, body, meta, title, h1


    print(
        html(lang="en")[
            head[
                meta(charset="UTF-8"),
                meta({"http-equiv": "X-UA-Compatible", "content": "IE=edge"}),
                meta(name="viewport", content="width=device-width, initial-scale=1.0"),
                title["py2html"]
            ],
            body[
                h1[
                    "Hello, Py2HTML!"
                ]
            ]
        ].render()
    )
    

\*formatted output

.. code:: html

    <html lang="en">
    <head>
    <meta charset="UTF-8"></meta>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"></meta>
    <title>py2html</title>
    </head>
    <body>
    <h1>Hello, Py2HTML!</h1>
    </body>
    </html>
