AST
liquid2.Node
Bases: ABC
Base class for all template nodes.
blank
instance-attribute
If True, indicates that the node, when rendered, produces no output text or only whitespace.
The output node ({{ something }}
) and echo tag are exception. Even if they
evaluate to an empty or blank string, they are not considered "blank".
block_scope
Return variables this node adds to the node's block scope.
children
Return this node's children.
children_async
async
An async version of children()
.
partial_scope
Return information about a partial template loaded by this node.
raise_for_disabled
Raise a DisabledTagError
if this node has a name in disabled_tags.
render_async
async
Write this node's content to buffer.
render_to_output
abstractmethod
Render the node to the output buffer.
Return
The number of "characters" written to the output buffer.
render_to_output_async
async
An async version of render_to_output.
liquid2.BlockNode
Bases: Node
A node containing a sequence of other nodes.
children
Return this node's children.
render_to_output
Render the node to the output buffer.
liquid2.ConditionalBlockNode
Bases: Node
A node containing a sequence of other nodes guarded by a Boolean expression.
children
Return this node's children.
render_to_output
Render the node to the output buffer.
liquid2.ast.Partial
dataclass
Partial template meta data.
in_scope
instance-attribute
Names that will be added to the partial template scope.
name
instance-attribute
An expression resolving to the name associated with the partial template.
liquid2.ast.PartialScope
Bases: Enum
The kind of scope a partial template should have when loaded.