cli
Class info¶
🛈 DocStrings¶
render
¶
render(
template_path: str = Option(None, *IN_CMDS, help=IN_HELP, show_default=False),
cfg_files: list[str] = Option(None, *CFG_CMDS, help=CFG_HELP, show_default=False),
output: str = Option(None, *OUT_CMDS, help=OUT_HELP, show_default=False),
undefined: str = Option("strict", *UNDEF_CMDS, help=UNDEF_HELP, show_default=False),
trim_blocks: bool = Option(None, *TRIM_CMDS, help=TRIM_HELP, show_default=False),
)
Render a Jinja template.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
template_path
|
str
|
Path to a (remote) template file. |
Option(None, *IN_CMDS, help=IN_HELP, show_default=False)
|
cfg_files
|
list[str]
|
JinjaFiles to load. |
Option(None, *CFG_CMDS, help=CFG_HELP, show_default=False)
|
output
|
str
|
Output path for resolved template. If not given, print to stdout. |
Option(None, *OUT_CMDS, help=OUT_HELP, show_default=False)
|
undefined
|
str
|
Set undefined behavior. Overrides JinjaFiles settings. |
Option('strict', *UNDEF_CMDS, help=UNDEF_HELP, show_default=False)
|
trim_blocks
|
bool
|
Trim blocks. Overrides JinjaFiles settings. |
Option(None, *TRIM_CMDS, help=TRIM_HELP, show_default=False)
|
Source code in src/jinjarope/cli.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
|