Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
ANN: Evoque - managed eval-based templating
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
mario ruggier  
View profile  
 More options Mar 7 2008, 10:45 am
Newsgroups: comp.lang.python.announce
From: mario ruggier <ma...@ruggier.org>
Date: Fri, 7 Mar 2008 16:45:36 +0100
Local: Fri, Mar 7 2008 10:45 am
Subject: ANN: Evoque - managed eval-based templating
I'm proud to announce the first public release of the Evoque templating
engine for python, version 0.1.

Evoque is a full-featured and generic text templating system for python
using a simple $-substitution syntax and providing support for flow
control, nested templates, overlays, inter-template addressing and
invocation, cache management, arbitrary python expressions, advanced
python % operator string 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.

Buzz

     * Full-featured pure python templating engine / 970 SLOC
     * Automatic input quoting / XSS protection (thanks to Qpy)
     * Restricted execution
     * Every text file is a template
     * Unicode
     * Simplicity
     * Speed (+/- same as Mako)
     * Academic Free License v. 3.0

Template Syntax

     $ -> escape, replaced with $
     ${expr} -> substitution, like %(expr)s
     ${expr!format} -> substitution, like %(expr)format
     $if{expr} ... $elif{expr} ... $else ... $fi
     $for{item in items} ... $else ... $rof
     $begin{label} ... $end{label}
     $prefer{raw=False, data=None, quoting=None, filters=None}
     $evoque{name, src=None, collection=None, raw=False,
         quoting=None, input_encoding=None, filters=None, **kw}
     $overlay{name, space="positive", src=None, collection=None,
         raw=False, quoting=None, input_encoding=None, **kw}
     $test{**kw}
     #[ comment ]#
     "\" at end-of-line consumes the following newline

Usage

     domain = Domain("/home/user/templates")
     print domain.get_template("snap.html").evoque(vars())

Homepage

     http://evoque.gizmojo.org/

--
Mario Ruggier


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google