pystache.common module

Exposes functionality needed throughout the project.

class pystache.common.MissingTags[source]

Bases: object

Contains the valid values for Renderer.missing_tags.

ignore = 'ignore'
strict = 'strict'
exception pystache.common.PystacheError[source]

Bases: Exception

Base class for Pystache exceptions.

exception pystache.common.TemplateNotFoundError[source]

Bases: PystacheError

An exception raised when a template is not found.

pystache.common.is_string(obj)[source]

Return whether the given object is a byte string or unicode string.

This function is provided for compatibility with both Python 2 and 3 when using 2to3.

pystache.common.read(path)[source]

Return the contents of a text file as a byte string.