class_docstr: Load templates from python eggs or packages.  It is constructed with
  the name of the python package and the path to the templates in that
  package::
  
      loader = PackageLoader('mypackage', 'views')
  
  If the package path is not given, ``'templates'`` is assumed.
  
  Per default the template encoding is ``'utf-8'`` which can be changed
  by setting the `encoding` parameter to something else.  Due to the nature
  of eggs it's only possible to reload templates if the package was loaded
  from the file system and not a zip file.
class_docstr_tok: ["Load","templates","from","python","eggs","or","packages",".","It","is","constructed","with","the","name","of","the","python","package","and","the","path","to","the","templates","in","that","package",":",":","loader","=","PackageLoader","(","'mypackage","'",",","'views","'",")","If","the","package","path","is","not","given",",","``","'templates","'","``","is","assumed",".","Per","default","the","template","encoding","is","``","'utf-8","'","``","which","can","be","changed","by","setting","the","`","encoding","`","parameter","to","something","else",".","Due","to","the","nature","of","eggs","it","'s","only","possible","to","reload","templates","if","the","package","was","loaded","from","the","file","system","and","not","a","zip","file","."]
code: def __init__(
      self, package_name, package_path="templates", encoding="utf-8"
  ):
      from pkg_resources import DefaultProvider
      from pkg_resources import get_provider
      from pkg_resources import ResourceManager
  
      provider = get_provider(package_name)
      self.encoding = encoding
      self.manager = ResourceManager()
      self.filesystem_bound = isinstance(provider, DefaultProvider)
      self.provider = provider
      self.package_path = package_path
  
imports: import os
  import sys
  import weakref
  from hashlib import sha1
  from os import path
  from types import ModuleType
  from ._compat import abc
  from ._compat import fspath
  from ._compat import iteritems
  from ._compat import string_types
  from .exceptions import TemplateNotFound
  from .utils import internalcode
  from .utils import open_if_exists
label_desc: Use image node_id 1 to create a new PackageLoader object from inherited base classes: BaseLoader with example: obj = PackageLoader(package_name, package_path, encoding)