summaryrefslogtreecommitdiff
path: root/pystache/init.py
diff options
context:
space:
mode:
Diffstat (limited to 'pystache/init.py')
-rw-r--r--pystache/init.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/pystache/init.py b/pystache/init.py
new file mode 100644
index 0000000..4544974
--- /dev/null
+++ b/pystache/init.py
@@ -0,0 +1,15 @@
+# encoding: utf-8
+
+from .template import Template
+from .view import View
+from .loader import Loader
+
+__all__ = ['Template', 'View', 'Loader', 'render']
+
+
+def render(template, context=None, **kwargs):
+
+ context = context and context.copy() or {}
+ context.update(kwargs)
+
+ return Template(template, context).render()