This commit is contained in:
2026-05-06 22:16:58 +03:30
commit 2ce93b51d7
10 changed files with 277 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
def render(obj, context):
if isinstance(obj, dict):
return {k: render(v, context) for k, v in obj.items()}
if isinstance(obj, list):
return [render(i, context) for i in obj]
if isinstance(obj, str):
return obj.format(**context)
return obj