Tayra is a full-featured abstract markup language to template web documents. It is primarily inspired from mako-templates and HAML (especially the indentation based markup definitions). Although it is young and relatively a new kid among the old-timers, it can be considered as the evolutionary next step for some of them. And probably it is the only templating language that allows developers to build and distribute their templates as plugins, not to mention the fact that tayra’s implementation itself is heavily based on plugins.
Load tayra template files implementing template plugins. package() entry point, that will be called during pluggdapps pre-booting, can use this API to load ttl files.
Pluggdapps package must implement this entry point. This function will be called during platform pre-booting. Other than some initialization stuff, like dynamically loading template plugins using loadttls(), this entry point must return a dictionary of key,value pairs describing the package.
Using an instance of TTLCompiler compiler, and command line options, translate ttlfile into corresponding HTML file. The intermediate .py file and the final HTML file are saved in the same directory as that of the ttlfile. options is expected to have attributes, args, context.
Bases: pluggdapps.plugin.Plugin
Base class for all plugins implementing one or more template interfaces. Developers need not worry about this. Code generator and runtime will automatically create a blueprint, using this class, from template-plugins. Provided the plugin is declared using @implement directive,:
@implement tayra.interfaces:ITayraTestInterface as XYZTestInterface