Genshi

Genshi - A toolkit for stream-based generation of output for the web
Download

Genshi Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Freeware
  • Publisher Name:
  • Edgewall Software
  • Operating Systems:
  • Windows All / Unix
  • File Size:
  • 131 KB

Genshi Tags


Genshi Description

Genshi is a Python library that offers an integrated set of components for processing, parsing and generating HTML, XML or other textual content for output generation on the web. Genshi is a "toolkit for stream-based generation of output for the web". The largest feature provided by Genshi is an XML-based template engine that is heavily inspired by Kid. But it also provides a text-based template engine, as well as a collection of tools for working with markup. Why XML-based? Most template engines for web applications are character-stream based: they know nothing about the format of the response body that is being generated. They simply substitute variable expressions, and provide some directives for looping, conditionals, etc. Thus they can be used to generate any kind of textual output, be it HTML, plain text emails, program code, or really anything else. However, 99% of the templates used by web applications generate some kind of XML/HTML-based markup. We believe that web applications can benefit from a template engine that "knows what it's doing" when it comes to markup. You don't need to worry about generating output that is not well-formed, nor do you need to worry about accidentially not escaping some data, thereby greatly reducing the risk for introducing XSS attack vectors. Furthermore, your templates look a lot more like the targetted output format: an HTML template looks like HTML, a template for an RSS feed looks like RSS. Directives in text-based template languages often result in rather messy templates, or produce excessive amounts of unnecessary white space.


Genshi Related Software