Evoque

Managed eval-based freeform templating
Download

Evoque Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Academic Free License
  • Price:
  • FREE
  • Publisher Name:
  • Mario Ruggier
  • Publisher web site:
  • http://evoque.gizmojo.org/

Evoque Tags


Evoque Description

Managed eval-based freeform templating Evoque is a full-featured generic text templating system for python using a simple $-substitution syntax and providing support for nested templates, flow control, overlays, inter-template addressing and invocation, cache management, arbitrary Python expressions, all python % operator formatting, restricted execution, automatic cross-site scripting protection, advanced encoding guessing algorithm, and more.Allowing only python expressions and a managed evaluation namespace, Evoque offers a surprising level of simplicity, versatility and performance. Here are some key features of "Evoque": · Full-featured pure Python templating engine / 992 SLOC · Python 2.4, 2.5, 2.6 and 3.0 · Unicode · Simplicity · Restrictable execution / sandbox · Data-driven template inheritance / runtime base template selection · Open-ended source or target file formats · Templates are managed via Collections in a Domain / cascading defaults · Domain-wide template names / addressing · Automatic input quoting / XSS protection · Speed Requirements: · Python What's New in This Release: · Evoque (package/unittests) now runs on all of python 2.4, 2.5, 2.6 and 3.0, simultaneously from the same identical code base. · The decodeh module (encoding guessing algorithm, now even more important in py3 when opening text files) becomes py3-aware by... · making read_from_file() always opens a file in binary mode · handling bytes as the non-unicode str case in py3 · Tighter lockdown of the in-process sandbox (thanks to Daniel Diniz for feedback and additional testing) by... · fail for all expressions that include lookups for attributes starting with any of: "__", "func_", "f_", "im_", "tb_", "gi_", "throw" · added "object" to the disallowed list of builtins · Changed behaviour of the Domain init parameter slurpy_directives=True, that now behaves in the following way: for each directive, strip all leading/trailing whitespace on the same line plus (on left) the initial newline -- if and only if the end of the line being slurped is made up of only whitespace. · Added whitespace test case. · Updated to qpy 1.7. · In the unit tests, replaced hash(s) as a shorthand way to compare strings with explicit strings. · Corrected problem with yield and try/finally that was breaking Template.test() under python 2.4. · In restricted mode, when initializing the globals namespace under python 2.4, the issubclass check is done against Exception as opposed to BaseException (that is not available in 2.4).


Evoque Related Software