The BaseTemplate class is accessible via the kid module.
All kid template modules expose a class named Template that extends from this class making the methods defined here available on all Template subclasses.
This class should not be instantiated directly.
Initialize a template with instance attributes specified by keyword arguments.
Keyword arguments are available to the template using self.var notation.
Execute template and write output to file.
Execute a template and return a single string.
This is a convienence method, roughly equivalent to:
''.join([x for x in obj.generate(encoding, fragment, output)]
Execute template and generate serialized output incrementally.
This method returns an iterator that yields an encoded string for each iteration. The iteration ends when the template is done executing.
Execute the template and apply any match transformations.
If stream is specified, it must be one of the following:
By default, the pull method is called to obtain the stream.
See the source for more information.