SlackBaseBlock#

pydantic model safir.slack.blockkit.SlackBaseBlock#

Base class for any Slack Block Kit block.

Parameters:

data (Any) –

Show JSON schema
{
   "title": "SlackBaseBlock",
   "description": "Base class for any Slack Block Kit block.",
   "type": "object",
   "properties": {}
}

abstract to_slack()#

Convert to a Slack Block Kit block.

Returns:

A Slack Block Kit block suitable for including in the fields or text section of a blocks element.

Return type:

dict

max_formatted_length: ClassVar[int] = 3000#

Maximum length of formatted output, imposed by Slack.

Intended to be overridden by child classes that need to impose different maximum lengths.

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.