compose.create_blocks

compose.create_blocks(*args)

Group block components for use in compose_email().

Collects multiple block_*() function calls into a renderable structure.

Parameters

*args : Union[Block, str] = ()

One or more block_*() calls or strings.

Returns

: BlockList

Container for blocks, renderable to email content.

Examples

from nbmail.compose import create_blocks, block_text, block_title, block_spacer

create_blocks(
    block_title("Welcome!"),
    block_text("This is the main content."),
    block_spacer("20px"),
    block_text("Thanks for reading!")
)

Welcome!

This is the main content.

Thanks for reading!