Package: django-actionable-messages
Actionable messagesBase informationsInstallationRequirementsUsageAdaptiveCardElementsTextBlockImageMediaSourceCaptionSourceMediaTextRunRichTextBlockInputsTextInputNumberInputDateInputTimeInputToggleInputInputChoiceChoiceSetInputDataQueryActionsOpenUrlSubmitShowCardTargetElementToggleVisibilityExecuteContainersActionSetContainerColumnColumnSetFactFactSetImageSetTableCellTableRowTableTypesBackgroundImageRefreshTokenExchangeResourceAuthCardButtonAuthenticationMetadataCardsAdaptiveCardMessageCardElementsHeaderFactHeroImageInputChoiceActionTargetInputsTextInputDateInputMultiChoiceInputActionsOpenUriHttpPOSTInvokeAddInCommandActionCardSectionsSectionCardsMessageCardHeroCardElementsOpenUrlImageCardsHeroCardThumbnailCardElementsCardsThumbnailCardBase informationsPlayground V2Send an actionable message via email in Office 365Outlook version requirements for actionable messagesInstallationpip install git+https://github.com/utsurius/django-actionable-messagespip install django-actionable-messagesAdd "django_actionable_messages" to INSTALLED_APPS:INSTALLED_APPS=[..."django_actionable_messages",]SETTINGSACTIONABLE_MESSAGES={"JSON_ENCODER":None,"LANGUAGE_CODE":"en"}"JSON_ENCODER" - doted path to custom json encoder (default: BaseEncoder)."LANGUAGE_CODE" - language code used for translations (defaults to project settings.LANGUAGE_CODE). Each element of adaptive_card/message_card can set individual "lang_code".RequirementsNameVersionpython3.6 - 3.10django3.2 - 4.2Usageexamples/message_card/github.pyfromdjango_actionable_messages.message_card.actionsimportOpenUri,HttpPOST,ActionCardfromdjango_actionable_messages.message_card.cardsimportMessageCardfromdjango_actionable_messages.message_card.elementsimportFact,ActionTargetfromdjango_actionable_messages.message_card.inputsimportTextInputfromdjango_actionable_messages.message_card.sectionsimportSectionfromdjango_actionable_messages.message_card.utilsimportOSTypeissue_opened=MessageCard(title="Issue opened:\"Push notifications not working\"",summary="Issue 176715375",theme_color="0078D7")issue_opened.add_sections(Section(activity_title="Miguel Garcie",activity_subtitle="9/13/2016, 11:46am",activity_image="https://connectorsdemo.azurewebsites.net/images/MSC12_Oscar_002.jpg",text="There is a problem with Push notifications, they don't seem to be picked up by the connector.",facts=[Fact("Repository:","mgarcia\\test"),Fact("Issue #:","176715375")]))issue_opened.add_actions([ActionCard(name="Add a comment",inputs=[TextInput(input_id="comment",title="Enter a comment",is_multiline=True)],actions=[HttpPOST("OK",target="http://...")]),HttpPOST("Close",target="http://..."),OpenUri(name="View in Github",targets=[ActionTarget(OSType.DEFAULT,"http://...")])])examples/adaptive_card/calendar_reminder.pyfromdjango_actionable_messages.adaptive_card.actionsimportSubmitfromdjango_actionable_messages.adaptive_card.cardsimportAdaptiveCardfromdjango_actionable_messages.adaptive_card.elementsimportTextBlockfromdjango_actionable_messages.adaptive_card.inputsimportInputChoice,ChoiceSetInputfromdjango_actionable_messages.adaptive_card.utilsimportSCHEMA,FontSize,FontWeight,SpacingStyle,ChoiceInputStylecalendar_reminder=AdaptiveCard(version="1.0",schema=SCHEMA)calendar_reminder.set_speak("Your  meeting about\"Adaptive Card design session\"is starting at 12:30pm""Do you want to snooze  or do you want to send a late notification to the attendees?")calendar_reminder.add_elements(TextBlock("Adaptive Card design session",size=FontSize.LARGE,weight=FontWeight.BOLDER))calendar_reminder.add_elements([TextBlock("Conf Room 112/3377 (10)",is_subtle=True),TextBlock("12:30 PM - 1:30 PM",is_subtle=True,spacing=SpacingStyle.NONE),TextBlock("Snooze for")])calendar_reminder.add_elements(ChoiceSetInput(item_id="snooze",style=ChoiceInputStyle.COMPACT,value="5",choices=[InputChoice("5 minutes","5"),InputChoice("15 minutes","15"),InputChoice("30 minutes","30")]))calendar_reminder.add_actions([Submit(title="Snooze",data={"x":"snooze"}),Submit(title="I'll be late",data={"x":"late"})])For more viewexamplesfolderTo get dictionary, json or html payload from card use:PropertyType.payloaddict(raw data).json_payloadjson string.html_payloadhtml string - can be used to send card via email (docs).signed_html_payloadhtml string1- can be used to send card via email (docs)[1] you must overwriteget_signed_payload()in AdaptiveCard/MessageCard to sign the payload!Problem:'... is not JSON serializable'- probably invalid argument type was used. Default json serializer can handle translated strings and everything thatDjangoJSONEncodercan handle.Solution:Better Python Object Serialization. Remember to ALWAYS inherit from EncoderMixin or BaseEncoder (django_actionable_messages.encoders import EncoderMixin, BaseEncoder)You can set JSON_ENCODER (globally) in SETTINGS(ACTIONABLE_MESSAGES) or set it by card(json_encoder):fromdjango_actionable_messages.adaptive_card.cardsimportAdaptiveCardclassMyAdaptiveCard(AdaptiveCard):json_encoder="path.to.my.encoder"orfromdjango_actionable_messages.adaptive_card.cardsimportAdaptiveCardclassMyAdaptiveCard(AdaptiveCard):json_encoder=MyJSONEncoderTo customize json dump you can overwriteget_json_dump_kwargs()in card (AdaptiveCard/MessageCard)fromdjango_actionable_messages.adaptive_card.cardsimportAdaptiveCardclassMyAdaptiveCard(AdaptiveCard):defget_json_dump_kwargs(self):return{'ensure_ascii':False,'indent':2}Send MessageCard to msteams using webhooks andrequestslibrary:importrequestsrequests.post(webhook_url,data=card.json_payload,headers={"Content-Type":"application/json; charset=utf-8"})To get/addwebhook_urlsee here:Get the Microsoft Teams webhook URL,Create and add an outgoing webhook in TeamsAdaptiveCardSupported versions:1.0 - 1.6Schema ExplorerElementssrc:from django_actionable_messages.adaptive_card.elements import ...TextBlockdocsArgument nameFunctionPropertyTypetext-textstr, trans3colorset_color()colorColor1font_typeset_font_type()fontTypeFontType1horizontal_alignmentset_horizontal_alignment()horizontalAlignmentHorizontalAlignment1is_subtleset_is_subtle()isSubtleboolmax_linesset_max_lines()maxLinesintsizeset_size()sizeFontSize1weightset_weight()weightFontWeight1wrapset_wrap()wrapboolfallbackset_fallback()fallbackFallbackOption1or card element2separatorset_separator()separatorboolspacingset_spacing()spacingSpacingStyle1item_idset_id()idstris_visibleset_is_visible()isVisibleboolrequiresset_requires()requiresdictheightset_height()heightBlockElementHeight1lang_code--str[1]from django_actionable_messages.adaptive_cards.utils import ...[2]from django_actionable_messages.adaptive_cards.elements import ...TypeAll exceptImportcontainersFact, Columnfrom django_actionable_messages.adaptive_cards.containers import ...elementsMediaSource, TextRunfrom django_actionable_messages.adaptive_cards.elements import ...inputsInputChoicefrom django_actionable_messages.adaptive_cards.inputs import ...[3] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...ImagedocsArgument nameFunctionPropertyTypeurlset_url()urlstralternate_textset_alternate_text()altTextstrbackground_colorset_background_color()backgroundColorstrheightset_height()heightstr or BlockElementHeight1horizontal_alignmentset_horizontal_alignment()horizontalAlignmentHorizontalAlignment1select_actionset_select_action()selectActionsee docssizeset_size()sizeImageSize1styleset_style()styleImageStyle1widthset_width()widthstrfallbackset_fallback()fallbackFallbackOption1or card element2separatorset_separator()separatorboolspacingset_spacing()spacingSpacingStyle1item_idset_id()idstris_visibleset_is_visible()isVisibleboolrequiresset_requires()requiresdictheightset_height()heightBlockElementHeight1lang_code--str[1]from django_actionable_messages.adaptive_cards.utils import ...[2]from django_actionable_messages.adaptive_cards.elements import ...TypeAll exceptImportcontainersFact, Columnfrom django_actionable_messages.adaptive_cards.containers import ...elementsMediaSource, TextRunfrom django_actionable_messages.adaptive_cards.elements import ...inputsInputChoicefrom django_actionable_messages.adaptive_cards.inputs import ...MediaSourcedocsArgument namePropertyTypemime_typemimeTypestrurlurlstrCaptionSourcedocsArgument namePropertyTypemime_typemimeTypestrurlurlstrlabellabelstrMediadocsArgument nameFunctionPropertyTypesources-sourceslistof MediaSource(s)1posterset_poster()posterstralternate_textset_alternate_text()altTextstrfallbackset_fallback()fallbackFallbackOption2or card element1separatorset_separator()separatorboolspacingset_spacing()spacingSpacingStyle2item_idset_id()idstris_visibleset_is_visible()isVisibleboolrequiresset_requires()requiresdictheightset_height()heightBlockElementHeight2lang_code--strOther functionsNamePropertyTypeadd_sources()sourcesMediaSource1add_source()sourcesMediaSource1set_caption_sources()captionSourcesCaptionSource2add_caption_sources()captionSourcesCaptionSource2add_caption_source()captionSourcesCaptionSource2[1]from django_actionable_messages.adaptive_cards.elements import ...[2]from django_actionable_messages.adaptive_cards.utils import ...TypeAll exceptImportcontainersFact, Columnfrom django_actionable_messages.adaptive_cards.containers import ...elementsMediaSource, TextRunfrom django_actionable_messages.adaptive_cards.elements import ...inputsInputChoicefrom django_actionable_messages.adaptive_cards.inputs import ...TextRundocsArgument nameFunctionPropertyTypetext-textstr, trans2colorset_color()colorColor1font_typeset_font_type()fontTypeFontType1highlightset_highlight()highlightboolis_subtleset_is_subtle()isSubtleboolitalicset_italic()italicboolselect_actionset_select_action()selectActionsee docssizeset_size()fontSizeFontSize1strike_throughset_strike_through()strikethroughboolweightset_weight()fontWeightFontWeight1lang_code--str[1]from django_actionable_messages.adaptive_cards.utils import ...[2] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...RichTextBlockdocsArgument nameFunctionPropertyTypeinlines-inlinesstr, TextRun1, trans4horizontal_alignmentset_horizontal_alignment()horizontalAlignmentHorizontalAlignment2fallbackset_fallback()fallbackFallbackOption2or card element1separatorset_separator()separatorboolspacingset_spacing()spacingSpacingStyle2item_idset_id()idstris_visibleset_is_visible()isVisibleboolrequiresset_requires()requiresdictheightset_height()heightBlockElementHeight2[1]from django_actionable_messages.adaptive_cards.elements import ...[2]from django_actionable_messages.adaptive_cards.utils import ...TypeAll exceptImportcontainersFact, Columnfrom django_actionable_messages.adaptive_cards.containers import ...elementsMediaSource, TextRunfrom django_actionable_messages.adaptive_cards.elements import ...inputsInputChoicefrom django_actionable_messages.adaptive_cards.inputs import ...[4] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...Inputssrc:from django_actionable_messages.adaptive_card.inputs import ...TextInputdocsArgument nameFunctionPropertyTypeis_multilineset_is_multiline()isMultilineboolmax_lengthset_max_length()maxLengthintplaceholderset_placeholder()placeholderstr, trans3styleset_style()styleTextInputStyle1inline_actionset_inline_action()inlineActionsee docsvalueset_value()valuestr, trans3fallbackset_fallback()fallbackFallbackOption1or card element2separatorset_separator()separatorboolspacingset_spacing()spacingSpacingStyle1item_idset_id()idstris_visibleset_is_visible()isVisibleboolrequiresset_requires()requiresdictheightset_height()heightBlockElementHeight1labelset_label()labelstr, TextBlock4, RichTextBlock4lang_code--str[1]from django_actionable_messages.adaptive_cards.utils import ...[2]from django_actionable_messages.adaptive_cards.elements import ...TypeAll exceptImportcontainersFact, Columnfrom django_actionable_messages.adaptive_cards.containers import ...elementsMediaSource, TextRunfrom django_actionable_messages.adaptive_cards.elements import ...inputsInputChoicefrom django_actionable_messages.adaptive_cards.inputs import ...[3] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...[4]from django_actionable_messages.adaptive_cards.elements import ...NumberInputdocsArgument nameFunctionPropertyTypemax_valueset_max_value()maxValueintmin_valueset_min_value()minValueintplaceholderset_placeholder()placeholderstr, trans3valueset_value()valueintfallbackset_fallback()fallbackFallbackOption1or card element2separatorset_separator()separatorboolspacingset_spacing()spacingSpacingStyle1item_idset_id()idstris_visibleset_is_visible()isVisibleboolrequiresset_requires()requiresdictheightset_height()heightBlockElementHeight1labelset_label()labelstr, TextBlock4, RichTextBlock4lang_code--str[1]from django_actionable_messages.adaptive_cards.utils import ...[2]from django_actionable_messages.adaptive_cards.elements import ...TypeAll exceptImportcontainersFact, Columnfrom django_actionable_messages.adaptive_cards.containers import ...elementsMediaSource, TextRunfrom django_actionable_messages.adaptive_cards.elements import ...inputsInputChoicefrom django_actionable_messages.adaptive_cards.inputs import ...[3] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...[4]from django_actionable_messages.adaptive_cards.elements import ...DateInputdocsArgument nameFunctionPropertyTypemax_valueset_max_value()maxValuestrmin_valueset_min_value()minValuestrplaceholderset_placeholder()placeholderstr, trans3valueset_value()valuestrfallbackset_fallback()fallbackFallbackOption1or card element2separatorset_separator()separatorboolspacingset_spacing()spacingSpacingStyle1item_idset_id()idstris_visibleset_is_visible()isVisibleboolrequiresset_requires()requiresdictheightset_height()heightBlockElementHeight1labelset_label()labelstr, TextBlock4, RichTextBlock4lang_code--str[1]from django_actionable_messages.adaptive_cards.utils import ...[2]from django_actionable_messages.adaptive_cards.elements import ...TypeAll exceptImportcontainersFact, Columnfrom django_actionable_messages.adaptive_cards.containers import ...elementsMediaSource, TextRunfrom django_actionable_messages.adaptive_cards.elements import ...inputsInputChoicefrom django_actionable_messages.adaptive_cards.inputs import ...[3] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...[4]from django_actionable_messages.adaptive_cards.elements import ...TimeInputdocsArgument nameFunctionPropertyTypemax_valueset_max_value()maxValuestrmin_valueset_min_value()minValuestrplaceholderset_placeholder()placeholderstr, trans3valueset_value()valuestrfallbackset_fallback()fallbackFallbackOption1or card element2separatorset_separator()separatorboolspacingset_spacing()spacingSpacingStyle1item_idset_id()idstris_visibleset_is_visible()isVisibleboolrequiresset_requires()requiresdictheightset_height()heightBlockElementHeight1labelset_label()labelstr, TextBlock4, RichTextBlock4lang_code--str[1]from django_actionable_messages.adaptive_cards.utils import ...[2]from django_actionable_messages.adaptive_cards.elements import ...TypeAll exceptImportcontainersFact, Columnfrom django_actionable_messages.adaptive_cards.containers import ...elementsMediaSource, TextRunfrom django_actionable_messages.adaptive_cards.elements import ...inputsInputChoicefrom django_actionable_messages.adaptive_cards.inputs import ...[3] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...[4]from django_actionable_messages.adaptive_cards.elements import ...ToggleInputdocsArgument nameFunctionPropertyTypetitle-titlestr, trans3valueset_value()valuestrvalue_offset_value_off()valueOffstrvalue_onset_value_on()valueOnstrwrapset_wrap()wrapboolfallbackset_fallback()fallbackFallbackOption1or card element2separatorset_separator()separatorboolspacingset_spacing()spacingSpacingStyle1item_idset_id()idstris_visibleset_is_visible()isVisibleboolrequiresset_requires()requiresdictheightset_height()heightBlockElementHeight1labelset_label()labelstr, TextBlock4, RichTextBlock4lang_code--str[1]from django_actionable_messages.adaptive_cards.utils import ...[2]from django_actionable_messages.adaptive_cards.elements import ...TypeAll exceptImportcontainersFact, Columnfrom django_actionable_messages.adaptive_cards.containers import ...elementsMediaSource, TextRunfrom django_actionable_messages.adaptive_cards.elements import ...inputsInputChoicefrom django_actionable_messages.adaptive_cards.inputs import ...[3] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...[4]from django_actionable_messages.adaptive_cards.elements import ...InputChoicedocsArgument namePropertyTypetitletitlestr, trans1valuevaluestr,intlang_code-str[1] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...ChoiceSetInputdocsArgument nameFunctionPropertyTypechoices-choiceslistof InputChoice(s)1is_multi_selectset_is_multi_select()isMultiSelectboolstyleset_style()styleChoiceInputStyle2valueset_value()valuestrwrapset_wrap()wrapboolfallbackset_fallback()fallbackFallbackOption2or card element3separatorset_separator()separatorboolspacingset_spacing()spacingSpacingStyle2item_idset_id()idstris_visibleset_is_visible()isVisibleboolrequiresset_requires()requiresdictheightset_height()heightBlockElementHeight2labelset_label()labelstr, TextBlock4, RichTextBlock4lang_code--str[1]from django_actionable_messages.adaptive_cards.inputs import ...[2]from django_actionable_messages.adaptive_cards.utils import ...[3]from django_actionable_messages.adaptive_cards.elements import ...TypeAll exceptImportcontainersFact, Columnfrom django_actionable_messages.adaptive_cards.containers import ...elementsMediaSource, TextRunfrom django_actionable_messages.adaptive_cards.elements import ...inputsInputChoicefrom django_actionable_messages.adaptive_cards.inputs import ...[4]from django_actionable_messages.adaptive_cards.elements import ...DataQuerydocsArgument nameFunctionPropertyTypedatasetset_dataset()datasetstrcountset_count()countintskipset_skip()skipintActionssrc:from django_actionable_messages.adaptive_card.actions import ...OpenUrldocsArgument nameFunctionPropertyTypeurl-urlstrtitleset_title()titlestr, trans3icon_urlset_icon_url()iconUrlstrstyleset_style()styleActionStyle2item_idset_id()idstrfallbackset_fallback()fallbackFallbackOption2or action1(except TargetElement1)tooltipset_tooltip()tooltipstris_enabledset_is_enabled()isEnabledboolmodeset_mode()modeActionMode2requiresset_requires()requiresdictlang_code--str[1]from django_actionable_messages.adaptive_cards.actions import ...[2]from django_actionable_messages.adaptive_cards.utils import ...[3] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...SubmitdocsArgument nameFunctionPropertyTypedataset_data()datastr,dicttitleset_title()titlestr, trans3icon_urlset_icon_url()iconUrlstrstyleset_style()styleActionStyle2item_idset_id()idstrfallbackset_fallback()fallbackFallbackOption2or action1(except TargetElement1)tooltipset_tooltip()tooltipstris_enabledset_is_enabled()isEnabledboolmodeset_mode()modeActionMode2requiresset_requires()requiresdictlang_code--str[1]from django_actionable_messages.adaptive_cards.actions import ...[2]from django_actionable_messages.adaptive_cards.utils import ...[3] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...ShowCarddocsArgument nameFunctionPropertyTypecardset_card()cardAdaptiveCard2titleset_title()titlestr, trans4icon_urlset_icon_url()iconUrlstrstyleset_style()styleActionStyle3item_idset_id()idstrfallbackset_fallback()fallbackFallbackOption3or action1(except TargetElement1)tooltipset_tooltip()tooltipstris_enabledset_is_enabled()isEnabledboolmodeset_mode()modeActionMode3requiresset_requires()requiresdictlang_code--str[1]from django_actionable_messages.adaptive_cards.actions import ...[2]from django_actionable_messages.adaptive_cards.cards import ...[3]from django_actionable_messages.adaptive_cards.utils import ...[4] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...TargetElementdocsArgument nameFunctionPropertyTypeelement_id-elementIdstris_visibleset_is_visible()isVisibleboolToggleVisibilitydocsArgument nameFunctionPropertyTypetarget_elementsset_target_elements()targetElementslistof TargetElement1/str/trans3(can be mixed)titleset_title()titlestricon_urlset_icon_url()iconUrlstrstyleset_style()styleActionStyle2item_idset_id()idstrfallbackset_fallback()fallbackFallbackOption1or action1(except TargetElement1)tooltipset_tooltip()tooltipstris_enabledset_is_enabled()isEnabledboolmodeset_mode()modeActionMode2requiresset_requires()requiresdictlang_code--str[1]from django_actionable_messages.adaptive_cards.actions import ...[2]from django_actionable_messages.adaptive_cards.utils import ...[3] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...ExecutedocsArgument nameFunctionPropertyTypeverbset_verb()verbstrdataset_data()datastr, objectassociated_inputsset_associated_inputs()associatedInputsAssociatedInputs1titleset_title()titlestricon_urlset_icon_url()iconUrlstrstyleset_style()styleActionStyle1fallbackset_fallback()fallbackFallbackOption1or action2(except TargetElement2)tooltipset_tooltip()tooltipstris_enabledset_is_enabled()isEnabledboolmodeset_mode()modeActionMode1requiresset_requires()requiresdictlang_code--str[1]from django_actionable_messages.adaptive_card.utils import ...[2]from django_actionable_messages.adaptive_card.actions import ...Containerssrc:from django_actionable_messages.adaptive_card.containers import ...ActionSetdocsArgument nameFunctionPropertyTypeactionsadd_actions()actionsaction orlistof actions(see docs)fallbackset_fallback()fallbackFallbackOption1or card element2separatorset_separator()separatorboolspacingset_spacing()spacingSpacingStyle1item_idset_id()idstris_visibleset_is_visible()isVisibleboolrequiresset_requires()requiresdictheightset_height()heightBlockElementHeight1lang_code--str[1]from django_actionable_messages.adaptive_cards.utils import ...[2]from django_actionable_messages.adaptive_cards.elements import ...TypeAll exceptImportcontainersFact, Columnfrom django_actionable_messages.adaptive_cards.containers import ...elementsMediaSource, TextRunfrom django_actionable_messages.adaptive_cards.elements import ...inputsInputChoicefrom django_actionable_messages.adaptive_cards.inputs import ...ContainerdocsArgument nameFunctionPropertyTypeitemsadd_items()itemsitem orlistof items(see docs)select_actionset_select_action()selectActionany action(see docs)styleset_style()styleStyle2vertical_content_alignmentset_vertical_content_alignment()verticalContentAlignmentVerticalAlignment2bleedset_bleed()bleedboolbackground_imageset_background_image()backgroundImageBackgroundImage1min_heightset_min_height()minHeightstrrtlset_rtl()rtlboolfallbackset_fallback()fallbackFallbackOption2or card element3separatorset_separator()separatorboolspacingset_spacing()spacingSpacingStyle2item_idset_id()idstris_visibleset_is_visible()isVisibleboolrequiresset_requires()requiresdictheightset_height()heightBlockElementHeight2lang_code--str[1]from django_actionable_messages.adaptive_cards.types import ...[2]from django_actionable_messages.adaptive_cards.utils import ...[3]from django_actionable_messages.adaptive_cards.elements import ...TypeAll exceptImportcontainersFact, Columnfrom django_actionable_messages.adaptive_cards.containers import ...elementsMediaSource, TextRunfrom django_actionable_messages.adaptive_cards.elements import ...inputsInputChoicefrom django_actionable_messages.adaptive_cards.inputs import ...ColumndocsArgument nameFunctionPropertyTypeitemsadd_items()itemsitem orlistof items(see docs)background_imageset_background_image()backgroundImagestr, BackgroundImage2bleedset_bleed()bleedboolfallbackset_fallback()fallbackFallbackOption3or Column1min_heightset_min_height()minHeightstrrtlset_rtl()rtlboolseparatorset_separator()separatorboolspacingset_spacing()spacingSpacingStyle3select_actionset_select_action()selectActionsee docsstyleset_style()styleStyle3vertical_content_alignmentset_vertical_content_alignment()verticalContentAlignmentVerticalAlignment3widthset_width()widthstr,int, Width3item_idset_id()idstris_visibleset_is_visible()isVisibleboolrequiresset_requires()requiresdictlang_code--str[1]from django_actionable_messages.adaptive_cards.containers import ...[2]from django_actionable_messages.adaptive_cards.types import ...[3]from django_actionable_messages.adaptive_cards.utils import ...ColumnSetdocsArgument nameFunctionPropertyTypecolumnsadd_columns()columnsColumn1orlistof Column(s)1select_actionset_select_action()selectActionsee docsstyleset_style()styleStyle2bleedset_bleed()bleedboolmin_heightset_min_height()minHeightstrfallbackset_fallback()fallbackFallbackOption2or card element3separatorset_separator()separatorboolspacingset_spacing()spacingSpacingStyle2item_idset_id()idstris_visibleset_is_visible()isVisibleboolrequiresset_requires()requiresdictheightset_height()heightBlockElementHeight2lang_code--str[1]from django_actionable_messages.adaptive_cards.containers import ...[2]from django_actionable_messages.adaptive_cards.utils import ...[3]from django_actionable_messages.adaptive_cards.elements import ...TypeAll exceptImportcontainersFact, Columnfrom django_actionable_messages.adaptive_cards.containers import ...elementsMediaSource, TextRunfrom django_actionable_messages.adaptive_cards.elements import ...inputsInputChoicefrom django_actionable_messages.adaptive_cards.inputs import ...FactdocsArgument namePropertyTypetitletitlestr, trans1valuevaluestr, trans1lang_code-str[1] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...FactSetdocsArgument nameFunctionPropertyTypefactsadd_facts()factsFact1orlistof Fact(s)1fallbackset_fallback()fallbackFallbackOption2or card element3separatorset_separator()separatorboolspacingset_spacing()spacingSpacingStyle2item_idset_id()idstris_visibleset_is_visible()isVisibleboolrequiresset_requires()requiresdictheightset_height()heightBlockElementHeight2lang_code--str[1]from django_actionable_messages.adaptive_cards.containers import ...[2]from django_actionable_messages.adaptive_cards.utils import ...[3]from django_actionable_messages.adaptive_cards.elements import ...TypeAll exceptImportcontainersFact, Columnfrom django_actionable_messages.adaptive_cards.containers import ...elementsMediaSource, TextRunfrom django_actionable_messages.adaptive_cards.elements import ...inputsInputChoicefrom django_actionable_messages.adaptive_cards.inputs import ...ImageSetdocsArgument nameFunctionPropertyTypeimagesadd_images()imagesImage1orlistof Image(s)1image_sizeset_image_size()imageSizeImageSize2fallbackset_fallback()fallbackFallbackOption2or card element3separatorset_separator()separatorboolspacingset_spacing()spacingSpacingStyle2item_idset_id()idstris_visibleset_is_visible()isVisibleboolrequiresset_requires()requiresdictheightset_height()heightBlockElementHeight2lang_code--str[1]from django_actionable_messages.adaptive_cards.elements import ...[2]from django_actionable_messages.adaptive_cards.utils import ...[3]from django_actionable_messages.adaptive_cards.elements import ...TypeAll exceptImportcontainersFact, Columnfrom django_actionable_messages.adaptive_cards.containers import ...elementsMediaSource, TextRunfrom django_actionable_messages.adaptive_cards.elements import ...inputsInputChoicefrom django_actionable_messages.adaptive_cards.inputs import ...TableCelldocsArgument nameFunctionPropertyTypeselect_actionset_select_action()selectActionExecute1, OpenUrl1, Submit1or ToggleVisibility1styleset_style()styleStyle2vertical_content_alignmentset_vertical_content_alignment()verticalContentAlignmentVerticalAlignment2bleedset_bleed()bleedboolbackground_imageset_background_image()backgroundImageBackgroundImage3orstrmin_heightset_min_height()minHeightstrrtlset_rtl()rtlboollang_code--str[1]from django_actionable_messages.adaptive_cards.actions import ...[2]from django_actionable_messages.adaptive_cards.utils import ...[3]from django_actionable_messages.adaptive_cards.types import ...TableRowArgument nameFunctionPropertyTypecellsadd_cells()cellsTableCell1lang_code--str[1]from django_actionable_messages.adaptive_cards.containers import ...TabledocsArgument nameFunctionPropertyTypecolumnsadd_columns()columnsdictrowsadd_rows()rowsTableRow1orlistof TableRow1horizontal_cell_content_alignmentset_horizontal_cell_content_alignment()horizontalCellContentAlignmentHorizontalAlignment2vertical_cell_content_alignmentset_vertical_cell_content_alignment()verticalCellContentAlignmentVerticalAlignment2first_row_as_headerset_first_row_as_header()firstRowAsHeaderboolshow_grid_linesset_show_grid_lines()showGridLinesboolgrid_styleset_grid_style()styleStyle2heightset_height()heightBlockElementHeight2fallbackset_fallback()fallbackFallbackOption2or card element3separatorset_separator()separatorboolspacingset_spacing()spacingSpacingStyle2item_idset_id()idstris_visibleset_is_visible()isVisibleboolrequiresset_requires()requiresdictlang_code--str[1]from django_actionable_messages.adaptive_cards.containers import ...[2]from django_actionable_messages.adaptive_cards.utils import ...[3]from django_actionable_messages.adaptive_cards.elements import ...Typessrc:from django_actionable_messages.adaptive_card.types import ...BackgroundImagedocsArgument nameFunctionPropertyTypeurlset_url()urlstrfill_modeset_fill_mode()fillModeFillMode1horizontal_alignmentset_horizontal_alignment()horizontalAlignmentHorizontalAlignment1vertical_alignmentset_vertical_alignment()verticalAlignmentVerticalAlignment1[1]from django_actionable_messages.adaptive_cards.utils import ...RefreshdocsArgument nameFunctionPropertyTypeactionset_action()actionExecute1expiresset_expires()expiresstr(ISO-8601)user_idsset_user_ids()listlist ofstr[1]from django_actionable_messages.adaptive_cards.actions import ...TokenExchangeResourcedocsArgument nameFunctionPropertyTypetoken_id-idstruri-uristrprovider_id-providerIdstrAuthCardButtondocsArgument nameFunctionPropertyTypebtn_type-typestrvalue-valuestrtitleset_title()titlestrimageset_image()imagestrAuthenticationdocsArgument nameFunctionPropertyTypetextset_text()textstrconnection_nameset_connection_name()connectionNamestrtoken_exchange_resourceset_token_exchange_resource()tokenExchangeResourceTokenExchangeResource1buttonsset_buttons()buttonslistof AuthCardButton1[1]from django_actionable_messages.adaptive_cards.types import ...MetadatadocsArgument nameFunctionPropertyTypeurlset_url()webUrlstrCardssrc:from django_actionable_messages.adaptive_card.cards import ...AdaptiveCarddocsArgument nameFunctionPropertyTypeversionset_version()versionstr, SCHEMA1schemaset_schema()$schemastrrefreshset_refresh()refreshRefresh3authenticationset_authentication()authenticationAuthentication3inputsadd_elements()inputsinput orlistof inputs(see docs)actionsadd_actions()actionsaction orlistof actions(see docs)select_actionset_select_action()selectActionsee docsstyleset_style()styleStyle1hide_original_bodyset_hide_original_body()hideOriginalBodyboolfallback_textset_fallback_text()fallbackTextstrbackground_imageset_background_image()backgroundImagestr, Image2metadataset_metadata()metadataMetadata3min_heightset_min_height()minHeightstrspeakset_speak()speakstrlangset_lang()langstrrtlset_rtl()rtlboolvertical_content_alignmentset_vertical_content_alignment()verticalContentAlignmentVerticalAlignment1lang_code--str[1]from django_actionable_messages.adaptive_cards.utils import ...[2]from django_actionable_messages.adaptive_cards.elements import ...[3]from django_actionable_messages.adaptive_cards.types import ...MessageCardLegacy actionable message card referenceElementssrc:from django_actionable_messages.message_card.elements import ...HeaderdocsArgument namePropertyTypenamenamestrvaluevaluestr,int**Fact**Argument namePropertyTypenamenamestr, trans1valuevaluestr, trans1lang_code-str[1] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...HeroImagedocsArgument nameFunctionPropertyTypeurl-imagestrtitleset_title()titlestr, trans1lang_code--str[1] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...InputChoiceArgument namePropertyTypenamedisplaystr, trans1valuevaluestr,intlang_code-str[1] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...ActionTargetArgument namePropertyTypeos_typeosOSType1urluristrlang_code-str[1]from django_actionable_messages.message_cards.utils import ...Inputssrc:from django_actionable_messages.message_card.inputs import ...TextInputdocsArgument nameFunctionPropertyTypemax_lengthset_max_length()maxLengthintis_multilineset_is_multiline()isMultilineboolinput_idset_id()idstrtitleset_title()titlestr, trans1valueset_value()valuestris_requiredset_is_required()isRequiredboollang_code--str[1] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...DateInputdocsArgument nameFunctionPropertyTypeinclude_timeset_include_time()maxLengthboolinput_idset_id()idstrtitleset_title()titlestr, trans1valueset_value()valuestris_requiredset_is_required()isRequiredboollang_code--str[1] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...MultiChoiceInputdocsArgument nameFunctionPropertyTypechoicesadd_choices()choiceslistof InputChoice(s)1is_multi_selectset_is_multi_select()isMultiSelectboolstyleset_style()styleChoiceStyle2input_idset_id()idstrtitleset_title()titlestr, trans3valueset_value()valuestris_requiredset_is_required()isRequiredboollang_code--strOther functionsNamePropertyTypeadd_choice()choicesInputChoice1[1]from django_actionable_messages.message_cards.inputs import ...[2]from django_actionable_messages.message_cards.utils import ...[3] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...Actionssrc:from django_actionable_messages.message_card.actions import ...OpenUridocsArgument nameFunctionPropertyTypename-namestr, trans2targetsadd_targets()targetslistof ActionTarget1lang_code--strOther functionsNamePropertyTypeadd_target()targetsActionTarget1add_targets()targetslistof ActionTarget1[1]from django_actionable_messages.message_cards.elements import ...[2] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...HttpPOSTdocsArgument nameFunctionPropertyTypename-namestr, trans2target-targetsstrheadersadd_headers()headersHeader1orlistof Header(s)1bodyset_body()bodystrbody_content_typeset_body_content_type()bodyContentTypestrlang_code--str[1]from django_actionable_messages.message_cards.elements import ...[2] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...InvokeAddInCommanddocsArgument nameFunctionPropertyTypename-namestr, trans1add_in_idset_add_in_id()addInIdstrdesktop_command_idset_desktop_command_id()desktopCommandIdstrinitialization_contextset_set_initialization_context()initializationContextdictlang_code--str[1] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...ActionCarddocsArgument nameFunctionPropertyTypename-namestr, trans1inputsadd_inputs()inputsinput orlistof inputs(see docs)actionsadd_actions()actionsaction orlistof actions(see docs)lang_code--str[1] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...Sectionssrc:from django_actionable_messages.message_card.sections import ...SectiondocsArgument nameFunctionPropertyTypestart_groupset_start_group()startGroupbooltitleset_title()titlestr, trans2textset_text()textstr, trans2activity_imageset_activity_image()activityImagestractivity_titleset_activity_title()activityTitlestr, trans2activity_subtitleset_activity_subtitle()activitySubtitlestr, trans2activity_textset_activity_text()activityTextstr, trans2hero_imageset_hero_image()heroImageHeroImage2factsadd_facts()factsFact(s)1orlistof Fact1actionsadd_potential_actions()potentialActionaction orlistof actions(see docs)lang_code--strOther functions:NamePropertyTypeset_activity(image, title, subtitle, text)activityImage, activityTitle, activitySubtitle, activityTextstr[1]from django_actionable_messages.message_cards.elements import ...[2] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...Cardssrc:from django_actionable_messages.message_card.cards import ...MessageCardArgument nameFunctionPropertyTypetitleset_title()titlestr, trans2textset_text()textstr, trans2originatorset_originator()originatorstrsummaryset_summary()summarystr, trans2theme_colorset_theme_color()themeColorstrcorrelation_idset_correlation_id()correlationIdstrauto_correlation_id*-correlationIdbool(default:True)expected_actorsset_expected_actors()expectedActorslistof emailshide_original_bodyset_hide_original_body()hideOriginalBodyboolsectionsadd_sections()sectionsSection1orlistof Sections1actionsadd_actions()potentialActionaction3orlistof actions3lang_code--strOther functions:NamePropertyTypeadd_expected_actors()expectedActorsstror list ofstr[1]from django_actionable_messages.message_cards.sections import ...[2] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...[3]from django_actionable_messages.message_cards.actions import ...HeroCardElementsOpenUrlArgument nameFunctionPropertyTypetitle-titlestr, trans1url-valuestr[1] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...ImageArgument nameFunctionPropertyTypeurl-valuestraltset_alt()altstr, trans1[1] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...Cardssrc:from django_actionable_messages.msteams_cards.cards import HeroCardHeroCarddocsArgument nameFunctionPropertyTypetitleset_title()titlestr, trans1subtitleset_subtitle()subtitlestr, trans1textset_text()textstr, trans1imagesadd_images()imagesImage2orlistof Images2buttonsadd_buttons()buttonsOpenUrl3orlistof OpenUrls3lang_code--str[1] any translation likefrom django.utils.translation import gettext, gettext_lazy, ...[2]from django_actionable_messages.msteams_cards.elements import Image[3]from django_actionable_messages.msteams_cards.elements import OpenUrlThumbnailCardElementssee HeroCardElementssectionCardssrc:from django_actionable_messages.msteams_cards.cards import ThumbnailCardThumbnailCarddocssee HeroCardHeroCardsection