Genshi
A toolkit for generation of output for the web
Decision gist · record as of 2026-08-14
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.AI-flagged interpretation of the facts on this page — verify before relying
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 · maintenance · safety
BSD (permissive) — BSD license is permissive, allowing use in commercial and private projects with minimal restrictions—include a copy of the license in distributions.
last release 2026-05-17 (89 days) · last repo commit 2026-05-17 · 98 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 290,018 downloads/mo, #7,994 on PyPI
Alternatives
Verify before relying
pip install genshi
from genshi.markup import MarkupTemplate
tmpl = MarkupTemplate('<div xmlns:py="http://genshi.edgewall.org/"><py:for each="item in items">${item}</py:for></div>')
print(tmpl.generate(items=['a', 'b', 'c']).render('html'))- 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.
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 on this page. Verify before relying on it.
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
genshi on PyPI
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('<div xmlns:py="http://genshi.edgewall.org/"><py:for each="item in items">${item}</py:for></div>')
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 | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageimportlib-resources |
| Maintenance | Actively maintained 89 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 290,018 / month, #7,994 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 3Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software Development :: Libraries :: Python ModulesTopic :: Text Processing :: Markup :: HTMLTopic :: Text Processing :: Markup :: XML |
Evidence: genshi-0.7.11-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “dynamic content generation”
- GenshiGenshi is a Python library for parsing, generating, and processing…
- ct3Cheetah3 is a template engine and code generation tool that processes…
- brancaBranca generates HTML and JavaScript pages from Python code using…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also empy · yattag · hyperscript · Jinja2 · MarkupPy · BeautifulSoup · beautifulsoup4 · htmltools · meld3 · turbohtml