BasicCard Class

A basic card

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Constructor

BasicCard(*, title: str | None = None, subtitle: str | None = None, text: str | None = None, images: List[CardImage] | None = None, buttons: List[CardAction] | None = None, tap: CardAction | None = None, **extra_data: Any)

Keyword-Only Parameters

Name Description
title
Default value: None
subtitle
Default value: None
text
Default value: None
images
Default value: None
buttons
Default value: None
tap
Default value: None

Attributes

buttons

Set of actions applicable to the current card

buttons: List[CardAction] | None

images

Array of images for the card

images: List[CardImage] | None

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_config: ClassVar[ConfigDict] = {'alias_generator': AliasGenerator(alias=None, validation_alias=<staticmethod(<function CustomBaseModel.validation_alias_generator>)>, serialization_alias=<staticmethod(<function CustomBaseModel.serialization_alias_generator>)>), 'arbitrary_types_allowed': True, 'extra': 'allow', 'populate_by_name': True, 'serialize_by_alias': True, 'validate_by_alias': True, 'validate_by_name': True}

subtitle

Subtitle of the card

subtitle: str | None

tap

This action will be activated when user taps on the card itself

tap: CardAction | None

text

Text for the card

text: str | None

title

Title of the card

title: str | None