{"categories":[{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/6"},{"label":"Dynamic Content","url":"https://skillfed.io/packages/category/internet-www-http-dynamic-content"},{"label":"HTML","url":"https://skillfed.io/packages/category/text-processing-markup-html"}],"enrichment":{"capability":"Dominate is a Python library for writing HTML documents programmatically using a DOM API, letting you generate HTML pages in pure Python without learning a template language.","skillfed_tags":["html-generation","templating-alternative"],"use_cases":["Generate HTML pages dynamically in web frameworks without a separate template engine.","Build reusable HTML components as decorated Python functions for modular page construction.","Create HTML reports or documentation programmatically from Python data structures.","Generate email templates or HTML content in backend services without string concatenation.","Prototype or test HTML structures in Python without writing raw markup strings."],"what_it_does":"Dominate provides a Pythonic way to construct HTML by treating each HTML element as a Python class. You instantiate tags, nest them using context managers or method chaining, set attributes via keyword arguments or dictionary-like access, and render the result to a string. The library eliminates the need to write raw HTML or learn a separate templating syntax\u2014instead, you write pure Python code that reads naturally and lets you use Python's full feature set (loops, conditionals, functions) to generate markup.\n\nThe package is lightweight with zero runtime dependencies and works across Python 3.7 through 3.12 as well as PyPy. It supports both human-readable pretty-printing and compact rendering, handles HTML5 data attributes, provides shortcuts for reserved keywords like `class` and `for`, and allows you to build reusable widget functions using decorators. It's commonly used for server-side HTML generation, dynamic page building, and creating HTML-based reports or documentation.","worth_installing":"Yes. Dominate is a mature, actively maintained library with no dependencies, broad Python version support, and no known vulnerabilities. The copyleft license (LGPL-3.0) requires source disclosure if you distribute the library itself, but poses no barrier for internal or open-source use. Install it if you prefer writing HTML in Python over templates or string manipulation."},"id":"dominate","links":{"html":"https://skillfed.io/packages/dominate","md":"https://skillfed.io/packages/dominate.md","pypi":"https://pypi.org/project/dominate/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2023-12-24","license_spdx":null,"license_treatment":"copyleft","name":"dominate","python_support":"supports_current","summary":"Dominate is a Python library for creating and manipulating HTML documents using an elegant DOM API."},"popularity":{"monthly_downloads":2148985,"position":3253,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"2.9.1"}
