Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxpoletaev/python-htmlutils
Python helpers for rendering HTML tags
https://github.com/maxpoletaev/python-htmlutils
Last synced: about 1 month ago
JSON representation
Python helpers for rendering HTML tags
- Host: GitHub
- URL: https://github.com/maxpoletaev/python-htmlutils
- Owner: maxpoletaev
- Created: 2015-11-05T15:30:57.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-02T12:54:01.000Z (about 9 years ago)
- Last Synced: 2024-08-09T02:25:48.361Z (5 months ago)
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
==========
Html utils
==========.. image:: https://travis-ci.org/zenwalker/python-htmlutils.svg
:target: https://travis-ci.org/zenwalker/python-htmlutils
:alt: Build StatusUsage
=====tags.tag(content: str, **attrs) -> str
--------------------------------------Render HTML tags as ``tags.h1('hello', _class='heading')``.
htmlutils.parse_attrs(attrs: str) -> dict
-----------------------------------------Parse a string like ``class="input" type="text" required`` into ``dict``.
htmlutils.render_attrs(attrs: dict) -> str
------------------------------------------Render ``dict`` to string like ``class="input" type="text" required``.
Running tests
=============::
$ python -m unittest tests/test_html.py