Yet Another Expansion Syntax (pronounced 'Yasssss Kweeeeen')
Project description
Yet Another Expansion Syntax (pronounced ‘Yasssss Kweeeeen’) for expanding complex data (YAML / JSON) with Jinja2 templating:
import yaes values = { "a": 1, "cs": [2, 3], "ds": "nuts" } block = { "transpose": { "b": "a" }, "iterate": { "c": "cs", "d": "ds" }, "condition": "{{ c != 3 and d != 't' }}", "values": {"L": 7} } list(yaes.each(block, values)) # [ # (block, {"a": 1, "cs": [2, 3], "ds": "nuts", "b": 1, "c": 2, "d": "n", "L": 7}), # (block, {"a": 1, "cs": [2, 3], "ds": "nuts", "b": 1, "c": 2, "d": "u", "L": 7}), # (block, {"a": 1, "cs": [2, 3], "ds": "nuts", "b": 1, "c": 2, "d": "s", "L": 7}) # ]
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yaes-0.1.2.tar.gz
(5.1 kB
view hashes)
Built Distribution
yaes-0.1.2-py3-none-any.whl
(4.7 kB
view hashes)