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.
What it is and what it does
This package implements the Adaptive Cards Template language for Python, allowing you to take a template JSON structure and dynamically expand it by injecting data and evaluating expressions. It supports inline data substitution via `$data`, conditional rendering with `$when`, expression evaluation using `${}` syntax, and special variables like `$root`, `$host`, and `$index`. The library is designed to work with Microsoft's Adaptive Cards format, which is commonly used in chatbots, messaging platforms, and other interactive UI contexts.
The package has no external runtime dependencies, making installation straightforward. However, it explicitly does not support Adaptive expressions prebuilt functions, which may be a limitation if your templates rely on those. Given that the first release was on 2025-05-08 and the latest on 2025-05-14, this is a very new project with minimal community adoption (2 repository stars), so real-world reliability and completeness of the implementation remain unvalidated.
Use it for:
- Dynamically generate Adaptive Cards for chatbot responses by expanding templates with user-specific data.
- Render conditional card layouts based on host environment or runtime context using `$when` and `$host`.
- Build templated UI components for Microsoft Teams or other Adaptive Card-compatible platforms.
- Substitute data into card templates for bulk card generation from structured datasets.
- Evaluate expressions in card templates to compute display values without manual JSON manipulation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Expands Adaptive Card templates by substituting data and expressions into JSON structures using the Adaptive Cards Template language, supporting inline data expansion, conditional rendering, and expression evaluation.
Yes, if you are building Adaptive Cards and need template expansion in Python and can tolerate early-stage software. The package has low install friction, permissive licensing, and no external dependencies. However, be aware that it is very new (first release 2025-05-08), has minimal adoption and community validation, does not support Adaptive expressions prebuilt functions, and carries aging maintenance status. Use it for non-critical projects or where you can afford to contribute fixes upstream if issues arise.
Install
adaptive-cards-templating-py on PyPI
pip
pip install adaptive-cards-templating-pyuv
uv add adaptive-cards-templating-pypoetry
poetry add adaptive-cards-templating-pyInstalling adaptive-cards-templating-py
Before you install
Low install friction with no runtime dependencies. Maintenance status is aging—the package was first released on 2025-05-08 with the latest release on 2025-05-14, and has only 2 repository stars, suggesting early-stage adoption and limited community validation.
License in practice
MIT License permits free use, modification, and distribution with minimal restrictions. You may use this in commercial and proprietary projects provided you retain the copyright and license notice.
Quickstart
pip install adaptive-cards-templating-py
from adaptive_cards_templating_py import Template
import json
template_json = {"type": "AdaptiveCard", "body": [{"type": "TextBlock", "text": "${message}"}]}
template = Template(template_json)
card = template.expand({"$root": {"message": "Hello, Adaptive Cards!"}})
print(json.dumps(card, indent=2))
Verify before relying
- Whether Adaptive expressions prebuilt functions are critical for your use case, since they are explicitly unsupported.
- Real-world performance and correctness coverage of the template language implementation beyond the documented features.
- Stability and API compatibility guarantees given the very recent first release and minimal maintenance history.
Package facts
| License | MIT License Copyright (c) [2025] [Dion Olsthoorn] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 457 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 91,581/month — #13,512 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: adaptive_cards_templating_py-0.1.5-py3-none-any.whl
Tags
More Markup packages
PyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
markdown-it-pyA Python markdown parser that converts markdown…
permissive · top 100 on PyPI
beautifulsoup4Beautiful Soup parses HTML and XML documents…
permissive · top 100 on PyPI
et-xmlfileet_xmlfile writes large XML files with minimal…
permissive · top 1,000 on PyPI
tomlkitParses and edits TOML files while preserving…
permissive · top 1,000 on PyPI
docstring-parserParses Python docstrings in ReST, Google,…
permissive · top 1,000 on PyPI
json-eParameterizes and transforms JSON data…
copyleft · top 5,000 on PyPI
microsoft-teams-cardsProvides Pydantic-based models for building…
permissive · top 5,000 on PyPI
empyEmPy is a templating system that embeds Python…
permissive · top 15,000 on PyPI
uri-templateExpands RFC 6570 URI Templates with variable…
permissive · top 1,000 on PyPI
pyscardpyscard provides Python bindings to interact…
copyleft · top 15,000 on PyPI
genankiGenerates Anki flashcard decks programmatically…
permissive · top 15,000 on PyPI
django-jinjaIntegrates Jinja2 templating into Django,…
permissive · top 15,000 on PyPI
zope.pagetemplatezope.pagetemplate provides a templating system…
unclear · top 15,000 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
sphinx_designA Sphinx extension that adds responsive web…
permissive · top 5,000 on PyPI