--- id: adaptive-cards-templating-py version: "0.1.5" 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) license_treatment: permissive maintenance: aging --- # 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. License: permissive · Maintenance: aging · Downloads: 91.6K/mo ## 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 above — 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 pip install adaptive-cards-templating-py uv add adaptive-cards-templating-py poetry add adaptive-cards-templating-py ## Installing 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_current - Install friction: low - Maintenance: aging - Downloads: 91.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags adaptive cards template expansion, JSON template rendering, adaptive cards python, dynamic card generation, template data substitution, conditional card rendering, adaptive expressions python, template-engine, json-processing, adaptive-cards [View on SkillFed](https://skillfed.io/packages/adaptive-cards-templating-py) · [View on PyPI](https://pypi.org/project/adaptive-cards-templating-py/)