Tayra Compiler implemented as plugin. It also implements pluggapps’ web interface ITemplate.
Bases: pluggdapps.plugin.Plugin
Tayra compiler. Implemented as plugin to leverage on pluggdapps configuration system. Also implement ITemplate. Creating a plugin instance can be a costly operation, to avoid this instantiate this plugin once and use _init() to initialize it for subsequent uses.
Clone a plugin with the same settings as this one. settings can also be overriden by passing settings key-word argument as a dictionary.
Translate a template script text or template script file into intermediate python text. Compile the python text and return the code object. If memcache configuration is enable, compile code is cached in memory using a hash value generated from template text.
Character encoding of original template script file.
Using the module object obtained from load() method, and a context dictionary, call the template module’s entry point to generate HTMl text and return the same.
tayra.codegen.InstrGen object.
Using an optional context, a dictionary of key-value pairs, and the code object obtained from compilettl() method, create a new module instance populating it with context and some standard references.
tayra.runtime.StackMachine object.
If present, absolute file path pointing to compiled template script, .py file.
String of python script translated from template script.
pluggdapps.interfaces.ITemplate.render() interface method. Generate HTML string from template script passed either via ttext or via tfile.
Convert template text into abstract-syntax-tree. Return the root node tayra.ast.Template.
Generate intermediate python text from ast obtained from toast() method. If configuration settings allow for persisting the generated python text, then this method will save the intermediate python text in file pointed by pyfile.
Absolute file path pointing to .ttl template script file in.
TemplateLookup object. Encapsulates location information for template file and its intermediate python file.
tayra.parser.TTLParser object.
String of template script either read from the template file or received directly.
Bases: builtins.object
Lookup template file, template text, intermediate python file.
Character encoding of original template script file.
Absolute file path pointing to compiled template script, .py file.
Absolute file path pointing to .ttl template script file in.
Hash value generated from template text.
String of template script either read from the template file or received directly.