Observed since 20 Oct, 19:05 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
adaptive-cards-templating-py
This library largely implements the JSON-to-JSON Adaptive Cards Template language for Python. Most features are supported, except for the Adaptive expressions prebuilt functions.
This library largely implements the JSON-to-JSON Adaptive Cards Template language for Python. It allows you to dynamically expand Adaptive Card templates using data and host-specific information.
$data.$when.${} syntax.if() and json().$root, $host, and $index for advanced templating.To install the package, use:
pip install adaptive-cards-templating-py
Here's a quick example of how to use the library:
import json
from adaptive_cards_templating_py import Template
# Define a template
template_json = {
"type": "AdaptiveCard",
"body": [
{
"type": "TextBlock",
"text": "${message}"
}
]
}
# Create a Template instance
template = Template(template_json)
# Expand the template with data
data = {
"$root": {
"message": "Hello, Adaptive Cards!"
}
}
card = template.expand(data)
# Pretty-print the card
print(json.dumps(card, indent=2))
Contributions are welcome! To contribute:
This project is licensed under the MIT License. See the LICENSE file for details.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
pytestEnvironment{
"extras": "",
"marker": "extra == \"test\"",
"requires_python": ">=3.7",
"evaluation": "NOT_EVALUATED"
} | pytest; extra == "test" | runtime |
bdist_wheel · 6.82 KB · Python py3
sdist · 6.49 KB · Python source
Shared repository data · GitHub
Observed since 20 Oct, 19:05 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:eef0f2f2ba9f46e82bbcc9290703425d8abb68e54359043b7e86abf3b7dfbcfb