LoaderMixin
Sub classes¶
Name | Children | Inherits |
---|---|---|
PrefixLoader jinjarope.loaders A loader for prefixing other loaders. |
||
ModuleLoader jinjarope.loaders This loader loads templates from precompiled templates. |
||
FunctionLoader jinjarope.loaders A loader for loading templates from a function. |
||
PackageLoader jinjarope.loaders A loader for loading templates from a package. |
||
FileSystemLoader jinjarope.loaders A loader to load templates from the file system. |
||
ChoiceLoader jinjarope.loaders A loader which combines multiple other loaders. |
||
DictLoader jinjarope.loaders A loader to load static content from a path->template-str mapping. |
||
RewriteLoader jinjarope.rewriteloader A loader which modifies templates based on a callable. |
||
NestedDictLoader jinjarope.configloaders A jinja loader for loading templates from nested dicts. |
||
FsSpecProtocolPathLoader jinjarope.fsspecloaders A jinja loader for fsspec filesystems. |
||
FsSpecFileSystemLoader jinjarope.fsspecloaders A jinja loader for fsspec filesystems. |
🛈 DocStrings¶
Loader mixin which allows to OR loaders into a choice loader.
Source code in src/jinjarope/loaders.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|
__contains__
¶
__contains__(path: str)
Check whether given path is loadable by this loader.
Source code in src/jinjarope/loaders.py
35 36 37 |
|
__getitem__
¶
Return the template object for given template path.
Source code in src/jinjarope/loaders.py
31 32 33 |
|
get_template_source
¶
get_template_source(template_path: str)
Return the source for given template path.
Source code in src/jinjarope/loaders.py
50 51 52 |
|
prefixed_with
¶
prefixed_with(prefix: str)
Return loader wrapped in a PrefixLoader instance with given prefix.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
prefix
|
str
|
The prefix to use |
required |
Source code in src/jinjarope/loaders.py
42 43 44 45 46 47 48 |
|