Well twig is used with a lot of things, but one example I like is:
https://craftcms.com/
With source code for the soon to released V3 at:
https://github.com/craftcms/cms
Now that's a full flight (web) content management system....but in many ways, in the content server context, that's how Calibre is acting. History has shown really need two things - a query system and a totally design independent templating system for the actual front end. Calibre probably already has most of what it needs for querying I suppose...
Twig, though, is definitely NOT an application language as such, rather a templating language (which came from the Symfony PHP framework originally, although I believe the syntax is based on Django ultimately...) -
https://twig.symfony.com/
Twig is very popular in the PHP world. Not probably the right thing for this, I would thing. Jinja2 would appear to be a quite similar thing for the Python world -http://jinja.pocoo.org/docs/2.9/