Clabate 0.2.0 is out

September 19, 2021

Clabate is a pythonic class-based template engine in less than 200 SLOC. This template engine allows you to define templates directly in python code with standard string formatting and all the power of subclassing.

In this 0.2.0 release I changed get_* members to customized properties. I call them template properties because they contain an additional argument, the rendering context.

"O, dear", you might say. The best practices is to separate HTML from the application code!!!

Well, who prevents you to separate all those *.py files with templates in your source tree like this? And bear in mind, the most of best practices end up as notorious.

You might also argue there's a lot of templating engines out there. Okay, I used many of them. And recently tried again the famous Jinja2. After glancing at escaping result I lost any desire to use it. Also, I was unable to do anything beyond simple things without extending it with custom code.

With Clabate you write everything in the most natural python way.

This site is powered by Clabate!

Here is the source code

It's available on PyPi as well: https://pypi.org/project/clabate/. So you can easily install it:

pip install clabate

I think it's very close to 1.0 release. Before rolling it out I need to revise the documentation, make project page, etc.