envconfig
Class info¶
Classes¶
Name | Children | Inherits |
---|---|---|
EnvConfig jinjarope.envconfig A class representing the config of an Environment. |
🛈 DocStrings¶
EnvConfig
dataclass
¶
A class representing the config of an Environment.
Does not include loaders, filters, tests, globals.
Source code in src/jinjarope/envconfig.py
11 12 13 14 15 16 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 53 54 55 56 57 58 59 60 61 62 63 64 |
|
block_end_string
class-attribute
instance-attribute
¶
block_end_string: str = '%}'
The string marking the end of a block. Defaults to '%}'.
block_start_string
class-attribute
instance-attribute
¶
block_start_string: str = '{%'
The string marking the beginning of a block. Defaults to '{%'.
comment_end_string
class-attribute
instance-attribute
¶
comment_end_string: str = '#}'
The string marking the end of a comment. Defaults to '#}'.
comment_start_string
class-attribute
instance-attribute
¶
comment_start_string: str = '{#'
The string marking the beginning of a comment. Defaults to '{#'.
extensions
class-attribute
instance-attribute
¶
A list of jinja2 extentions.
keep_trailing_newline
class-attribute
instance-attribute
¶
keep_trailing_newline: bool = False
Preserve the trailing newline when rendering templates. The default is False.
The default causes a single newline, if present, to be stripped from the end of the template.
line_comment_prefix
class-attribute
instance-attribute
¶
line_comment_prefix: str | None = None
If given and a string, this will be used as prefix for line based comments.
line_statement_prefix
class-attribute
instance-attribute
¶
line_statement_prefix: str | None = None
If given and a string, this will be used as prefix for line based statements.
lstrip_blocks
class-attribute
instance-attribute
¶
lstrip_blocks: bool = False
Strip leading spaces / tabs from start of a line to a block. Defaults to False.
newline_sequence
class-attribute
instance-attribute
¶
newline_sequence: Literal['\n', '\r\n', '\r'] = '\n'
The sequence that starts a newline. ('\r', '\n' or '\r\n'. Defaults to '\n'
trim_blocks
class-attribute
instance-attribute
¶
trim_blocks: bool = True
Remove first newline after a block (not variable tag!). Defaults to False.
undefined
class-attribute
instance-attribute
¶
undefined: type[Undefined] = StrictUndefined
The undefined object determining the "Undefined" behavior.
variable_end_string
class-attribute
instance-attribute
¶
variable_end_string: str = '}}'
The string marking the end of a print statement. Defaults to '}}'.
variable_start_string
class-attribute
instance-attribute
¶
variable_start_string: str = '{{'
The string marking the end of a print statement. Defaults to '}}'.
as_dict
¶
Return dataclass as a dict, filtering all None-values.
Source code in src/jinjarope/envconfig.py
58 59 60 61 62 63 64 |
|