Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Suba
----
Author: Jesse Dailey <jesse.dailey@gmail.com>

Suba (suhb-uh) is a fast template engine.

Inspired by python's Mod (%) operator's string substitution.

>>> template(text="This is a test of %(who)s.", who="Suba")
'This is a test of Suba.'

Unlike the Mod operator, you can include ANY valid python as the substitution expression, not just key names.

>>> template(text="These are numbers: %( " ".join((x+x for x in range(1,10))) )s")
'These are numbers: 2 4 6 8 10 12 14 16 18'

See the extensive doctests in suba.py, and the test/ folder.

For a speed comparison, look in the benchmark/ folder.

About

Suba is a very fast template engine for Python 3k.

Resources

Stars

3 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages