def __init__(self, template):
        """
        :param template: (string | dict) - The directory or dict map of templates
            - as string: A directory
            - as dict: {'index.html': 'source here'}
        """
        loader = None
        if template:
            if isinstance(template, dict):
                loader = DictLoader(template)
            elif os.path.isdir(template):
                loader = FileSystemLoader(template)

            if loader:
                self.env = Environment(loader=loader)
def __init__ ( self , template ) : loader = None if template : if isinstance ( template , dict ) : loader = DictLoader ( template ) elif os . path . isdir ( template ) : loader = FileSystemLoader ( template ) if loader : self . env = Environment ( loader = loader )
:param template: (string | dict) - The directory or dict map of templates
            - as string: A directory
            - as dict: {'index.html': 'source here'}