Ibis

A template engine for people who enjoy the simpler things in life.

Version 3.0.0

Home


Ibis is a lightweight template engine for Python.

Sample syntax:

{% for post in posts %}
    <li><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}

Features:

Ibis isn't intended to be comprehensive or to handle every possible use case for a template engine — instead its aim is to be simple, robust, and pleasant to use.

Installation

Install Ibis directly from the Python Package Index using pip:

$ pip install ibis

Ibis requires Python 3.6 or later.

Rationale

Once upon a time I was interested in how template engines worked, so I built a simple one to find out. Then I got carried away and kept adding features until it could do everything I wanted. The result was Ibis.

If you're looking for a template engine for your Python application your first port of call should be Jinja — it's the most comprehensive, optimised, and battle-tested engine available. But if you're looking for something simpler — maybe something you can fork and tinker with and customize to suit your own particular use case — you might find Ibis to your liking.

And if, like once-upon-a-time me, you're interested in how template engines work, you're in luck — I've written up a detailed tutorial which will walk you through the process of building one of your own.

Contributing

My goal is to keep Ibis as small and simple as possible so I almost certainly won't accept pull requests that add new features. Bug reports are always welcome!

License

This work has been placed in the public domain.