fluent-cards 0.1.0b2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fluent_cards-0.1.0b2/.coverage +0 -0
- fluent_cards-0.1.0b2/.gitignore +10 -0
- fluent_cards-0.1.0b2/PKG-INFO +9 -0
- fluent_cards-0.1.0b2/README.md +50 -0
- fluent_cards-0.1.0b2/coverage.xml +1682 -0
- fluent_cards-0.1.0b2/fluent_cards/__init__.py +121 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/__init__.py +51 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/action_builder.py +96 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/action_set_builder.py +26 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/adaptive_card_builder.py +229 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/authentication_builder.py +27 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/background_image_builder.py +26 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/column_builder.py +74 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/column_set_builder.py +58 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/container_builder.py +109 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/fact_set_builder.py +26 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/image_builder.py +62 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/image_set_builder.py +33 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/inputs/__init__.py +15 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/inputs/input_choice_set_builder.py +58 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/inputs/input_date_builder.py +46 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/inputs/input_number_builder.py +46 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/inputs/input_text_builder.py +62 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/inputs/input_time_builder.py +46 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/inputs/input_toggle_builder.py +50 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/media_builder.py +34 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/refresh_builder.py +27 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/rich_text_block_builder.py +34 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/table_builder.py +46 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/text_block_builder.py +71 -0
- fluent_cards-0.1.0b2/fluent_cards/builders/text_run_builder.py +54 -0
- fluent_cards-0.1.0b2/fluent_cards/enums.py +132 -0
- fluent_cards-0.1.0b2/fluent_cards/models.py +102 -0
- fluent_cards-0.1.0b2/fluent_cards/serialization.py +27 -0
- fluent_cards-0.1.0b2/fluent_cards/teams.py +409 -0
- fluent_cards-0.1.0b2/fluent_cards/validation.py +346 -0
- fluent_cards-0.1.0b2/pyproject.toml +17 -0
- fluent_cards-0.1.0b2/tests/__init__.py +0 -0
- fluent_cards-0.1.0b2/tests/test_actions.py +104 -0
- fluent_cards-0.1.0b2/tests/test_builder.py +101 -0
- fluent_cards-0.1.0b2/tests/test_elements.py +219 -0
- fluent_cards-0.1.0b2/tests/test_inputs.py +159 -0
- fluent_cards-0.1.0b2/tests/test_serialization.py +181 -0
- fluent_cards-0.1.0b2/tests/test_teams.py +147 -0
- fluent_cards-0.1.0b2/tests/test_validation.py +281 -0
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fluent-cards
|
|
3
|
+
Version: 0.1.0b2
|
|
4
|
+
Summary: Fluent builder API for Adaptive Cards
|
|
5
|
+
License: MIT
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Provides-Extra: dev
|
|
8
|
+
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
|
|
9
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# FluentCards — Python
|
|
2
|
+
|
|
3
|
+
A Python library for building [Adaptive Cards](https://adaptivecards.io/) using a fluent builder pattern with strong typing and built-in validation.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install fluent-cards
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from fluent_cards import AdaptiveCardBuilder, TextSize, TextWeight
|
|
15
|
+
|
|
16
|
+
card = (AdaptiveCardBuilder.create()
|
|
17
|
+
.with_version('1.5')
|
|
18
|
+
.add_text_block(lambda tb: tb
|
|
19
|
+
.with_text('Hello, FluentCards!')
|
|
20
|
+
.with_size(TextSize.LARGE)
|
|
21
|
+
.with_weight(TextWeight.BOLDER)
|
|
22
|
+
.with_wrap(True))
|
|
23
|
+
.build())
|
|
24
|
+
|
|
25
|
+
print(card.to_json())
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Project Layout
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
python/
|
|
32
|
+
├── fluent_cards/ # Library package
|
|
33
|
+
│ ├── builders/ # Fluent builder classes
|
|
34
|
+
│ ├── enums.py # String enums
|
|
35
|
+
│ ├── models.py # Dataclasses and types
|
|
36
|
+
│ ├── serialization.py
|
|
37
|
+
│ ├── validation.py
|
|
38
|
+
│ └── __init__.py # Public API
|
|
39
|
+
└── tests/ # pytest test suite
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Build & Test
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
cd python
|
|
46
|
+
pip install -e ".[dev]"
|
|
47
|
+
pytest
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
See the [root README](../README.md) for more details.
|