Adaptive Cards are an open card exchange format enabling developers to exchange UI content in a common and consistent way.
Card Authors describe their content as a simple JSON object. That content can then be rendered natively inside a Host Application, automatically adapting to the look and feel of the Host.
The goals for Adaptive Cards are:
- Portable - To any app, device, and UI framework
- Open - Libraries and schema are open source and shared
- Low cost - Easy to define, easy to consume
- Expressive - Targeted at the long tail of content that developers want to produce
- Purely declarative - No code is needed or allowed
- Automatically styled - To the Host application UX and brand guidelines
from msadaptivecards.cards import AdaptiveCard
from msadaptivecards.elements import TextBlock
adaptive_card = AdaptiveCard()
text_block = TextBlock(text="Hello World")
json = adaptive_card.json(by_alias=True, exclude_none=True)