Hacker News new | ask | show | jobs
by zahlman 605 days ago
>This is not a full templating language like Jinja, and does not support things like template inheritance, etc. Rather, empyt can be used as an 'extension' alongside other templating engines.

It would probably be helpful to show examples of what it does support, and how that complements an existing templating engine like Jinja. In the README it looks like empyt wraps an existing templating engine, but it isn't clear what that wrapping accomplishes.

1 comments

This is some great feedback {and actually filed as the first issue :) } https://github.com/crypto-rizzo/empyt/issues/1

Documentation + examples are definitely lacking ATM. Will be rectified in short order. To answer your question now, the goal is pretty simple: enable python to be directly used in HTML templates.

For usage with another template engine, I see it as more of a convenience / speed factor. Quickly write frontend logic in python without reaching for a new (albeit similar) syntax.

empyt can also be used standalone, in situations where people want to avoid a templating engine altogether, and just want to use python on the frontend.

with templating engine: https://github.com/crypto-rizzo/empyt/blob/master/examples/t...

without templating engine: https://github.com/crypto-rizzo/empyt/blob/master/examples/t...