--- id: genshi version: "0.7.11" license: BSD license_treatment: permissive maintenance: active --- # Genshi — A toolkit for generation of output for the web License: permissive · Maintenance: active · Downloads: 290.0K/mo ## What it is and what it does Genshi is a web templating and markup processing toolkit that combines parsing, generation, and transformation of HTML, XML, and text content. It provides a template language inspired by Kid, allowing developers to embed dynamic logic directly into markup for server-side output generation. The library handles the full pipeline from template definition through rendering to final output format. The package is designed for web applications that need to generate dynamic HTML or XML content programmatically. It sits between raw string concatenation and heavier frameworks, offering a middle ground with integrated parsing and a domain-specific template syntax. With a single runtime dependency and low install friction, it integrates straightforwardly into existing Python projects. Use it for: - Generate dynamic HTML pages from templates with embedded Python logic for web applications. - Transform and process XML documents by parsing, modifying, and re-rendering them. - Build email templates that mix markup structure with dynamic content substitution. - Create configuration or report files in HTML or XML format from Python data structures. - Parse and validate HTML or XML input, then output sanitized or transformed versions. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Genshi is a Python library for parsing, generating, and processing HTML, XML, and other textual content, with a built-in template language inspired by Kid for web output generation. Yes, if you need a lightweight, integrated template engine for HTML/XML generation in web projects. The permissive BSD license, low install friction, active maintenance, and zero known vulnerabilities make it a safe choice. However, verify Python version support for your target runtime, as classifiers list both Python 2 and 3 without specifying which versions are actually supported. ## Install pip install genshi uv add genshi poetry add genshi ## Installing Genshi Before you install: Low install friction with a single runtime dependency (importlib-resources). The package is actively maintained with a recent release and no known vulnerabilities. License in practice: BSD license is permissive, allowing use in commercial and private projects with minimal restrictions—include a copy of the license in distributions. Quickstart: pip install genshi from genshi.markup import MarkupTemplate tmpl = MarkupTemplate('
${item}
') print(tmpl.generate(items=['a', 'b', 'c']).render('html')) Verify before relying: - Whether the package supports modern Python versions beyond what classifiers indicate (Python 2 and 3 both listed). - Current state of the Kid template language inspiration—whether Genshi's syntax remains compatible with or diverges from Kid. - Whether importlib-resources is required only for older Python versions or unconditionally. ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 290.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags HTML XML template engine, web content generation, template language Python, markup processing library, dynamic content generation, text processing templates, Kid-inspired templating, templating, markup-processing, web-generation [View on SkillFed](https://skillfed.io/packages/genshi) · [View on PyPI](https://pypi.org/project/genshi/)