This release is a pre-release and may not be stable for production use.
FluentCards — Python
A Python library for building Adaptive Cards using a fluent builder pattern with strong typing and built-in schema validation.
Also available for .NET (NuGet), Node.js (npm), and Go.
Installation
pip install fluent-cards
Quick Start
from fluent_cards import AdaptiveCardBuilder, TextSize, TextWeight, to_json
card = (AdaptiveCardBuilder.create()
.with_version('1.5')
.add_text_block(lambda tb: tb
.with_text('Hello, FluentCards!')
.with_size(TextSize.Large)
.with_weight(TextWeight.Bolder)
.with_wrap(True))
.add_action(lambda a: a
.open_url('https://adaptivecards.io')
.with_title('Learn More'))
.build())
print(to_json(card))
Output:
{
"type": "AdaptiveCard",
"version": "1.5",
"body": [
{
"type": "TextBlock",
"text": "Hello, FluentCards!",
"size": "Large",
"weight": "Bolder",
"wrap": true
}
],
"actions": [
{
"type": "Action.OpenUrl",
"url": "https://adaptivecards.io",
"title": "Learn More"
}
]
}
Features
- Fluent builder API — chainable, readable card construction
- Strong typing — enums for all Adaptive Cards schema values (
TextSize,TextWeight,Colors,ContainerStyle, etc.) - Built-in validation — catches schema errors before the card is sent
- Zero dependencies — pure Python, no third-party packages required
- Full schema support — TextBlock, Image, ColumnSet, Container, FactSet, ActionSet, and more
More Examples
Card with image and actions
from fluent_cards import AdaptiveCardBuilder, TextSize, TextWeight, ActionStyle
card = (AdaptiveCardBuilder.create()
.with_version('1.5')
.add_text_block(lambda tb: tb
.with_text('Order Confirmed')
.with_size(TextSize.Large)
.with_weight(TextWeight.Bolder))
.add_text_block(lambda tb: tb
.with_text('Your order #12345 has been placed.')
.with_wrap(True))
.add_action(lambda a: a
.open_url('https://example.com/track/12345')
.with_title('Track Order'))
.build())
Card with columns
from fluent_cards import AdaptiveCardBuilder
card = (AdaptiveCardBuilder.create()
.with_version('1.5')
.add_column_set(lambda cs: cs
.add_column(lambda col: col
.with_width('auto')
.add_text_block(lambda tb: tb.with_text('Name:')))
.add_column(lambda col: col
.with_width('stretch')
.add_text_block(lambda tb: tb.with_text('Jane Doe'))))
.build())
Using choices (Input.ChoiceSet)
from fluent_cards import AdaptiveCardBuilder
card = (AdaptiveCardBuilder.create()
.with_version('1.5')
.add_input_choice_set(lambda cs: cs
.with_id('priority')
.with_label('Priority')
.add_choice('High', 'high')
.add_choice('Medium', 'medium')
.add_choice('Low', 'low'))
.build())
Validation
from fluent_cards import AdaptiveCardBuilder, validate
card = AdaptiveCardBuilder.create().build() # no version set
errors = validate(card)
for error in errors:
print(error)
API Reference
See the full API docs for all builder methods and enums.
Development
git clone https://github.com/rido-min/FluentCards.git
cd FluentCards/python
pip install -e ".[dev]"
pytest
License
MIT — see LICENSE for details.
Metadata
Release files for fluent-cards 0.2.0b5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fluent_cards-0.2.0b5.tar.gz | 62.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fluent_cards-0.2.0b5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 113.0 kB
Release files / fluent_cards-0.2.0b5.tar.gz
| Download URL | fluent_cards-0.2.0b5.tar.gz |
|---|---|
| Size | 62.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aea311ad0c96cee366dd4ba52f013b645a861bb37da92813902d88793c3491a7
|
|
BLAKE2b-256 checksum How to use checksums |
1f8873845a7f77f8abc68375340fc42436a5d36c63fca8898c34307a127072be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 27, 2026.
Transparency logRelease files / fluent_cards-0.2.0b5-py3-none-any.whl
| Download URL | fluent_cards-0.2.0b5-py3-none-any.whl |
|---|---|
| Size | 50.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ad24088893d66b119b7340f4fda38dd64e18afda599412bb82b448563a98770
|
|
BLAKE2b-256 checksum How to use checksums |
72ee1eb712ca0f4d3da458ca7305644ce877c3cbd50b0b7730b5fee850aa9930
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 27, 2026.
Transparency log