summaryrefslogtreecommitdiff
path: root/pystache/init.py
diff options
context:
space:
mode:
Diffstat (limited to 'pystache/init.py')
-rw-r--r--pystache/init.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/pystache/init.py b/pystache/init.py
new file mode 100644
index 0000000..b285a5c
--- /dev/null
+++ b/pystache/init.py
@@ -0,0 +1,21 @@
+# encoding: utf-8
+
+"""
+This module contains the initialization logic called by __init__.py.
+
+"""
+
+from pystache.renderer import Renderer
+from pystache.template_spec import TemplateSpec
+
+
+__all__ = ['render', 'Renderer', 'TemplateSpec']
+
+
+def render(template, context=None, **kwargs):
+ """
+ Return the given template string rendered using the given context.
+
+ """
+ renderer = Renderer()
+ return renderer.render(template, context, **kwargs)