diff --git a/pystache/core.py b/pystache/core.py index 3d1b0b8..a02d89b 100644 --- a/pystache/core.py +++ b/pystache/core.py @@ -1,13 +1,23 @@ # -*- coding: utf-8 -*- +""" +pystache.core +~~~~~~~~~~~~~ + +This module provides the main entrance point to Pystache. +""" + + from .template import Template from .view import View from .loader import Loader + __all__ = ['Template', 'View', 'Loader', 'render'] def render(template, context=None, **kwargs): + """Renders a template string against the given context.""" context = context and context.copy() or {} context.update(kwargs) diff --git a/pystache/template.py b/pystache/template.py index c1b703c..e5ee690 100644 --- a/pystache/template.py +++ b/pystache/template.py @@ -1,5 +1,12 @@ # -*- coding: utf-8 -*- +""" +pystache.template +~~~~~~~~~~~~~~~~~ + +This module provides Pystache's Template class. +""" + import re import cgi import collections @@ -15,6 +22,7 @@ except ImportError: literal = unicode + class Modifiers(dict): """Dictionary with a decorator for assigning functions to keys."""