Slack Blocks#
- class SlackLabelValueListBlock(*entries: SlackLabelValuePair, **kwargs)[source]#
Bases:
SlackMessageMarkdownA Slack message label/value list block
- Parameters:
*entries – any SlackLabelValuePair entries
- add_entry(entry: SlackLabelValuePair) None[source]#
Add an entry to the list.
- class SlackLabelValuePair(label: str = '', value: str = '', label_url: str = '', value_url: str = '')[source]#
Bases:
objectA label/value pair
- Parameters:
label – the label
value – the value
label_url – the label URL
value_url – the value URL
- class SlackMessageBlock(*blocks)[source]#
Bases:
objectA Slack message block
- Parameters:
*blocks – any child blocks
- class SlackMessageContext(*elements: SlackElementType, **kwargs)[source]#
Bases:
SlackMessageBlockA Slack message context
- Parameters:
*elements – any SlackElementType elements
- add_element(element: SlackElementType) None[source]#
Add an element to the context.
- class SlackMessageDivider(*blocks)[source]#
Bases:
SlackMessageBlockA Slack message divider
- class SlackMessageHeader(*args, text: str = '', emoji: bool = True, **kwargs)[source]#
Bases:
SlackMessageBlockA Slack message header
- Parameters:
text – the header text
emoji – whether to allow emojis
- class SlackMessageMarkdown(*args, text: str = '', image_url: str = '', alt_text: str = '', **kwargs)[source]#
Bases:
SlackMessageBlockA Slack message markdown
- Parameters:
text – the markdown text
image_url – the image URL
alt_text – the alternative text
- class SlackMessageValueBlock(*args, label: str = '', value: str = '', secondary_label: str = '', secondary_value: str = '', **kwargs)[source]#
Bases:
SlackMessageBlockA Slack message value block
- Parameters:
label – the label
value – the value
secondary_label – the secondary label
secondary_value – the secondary value