Created
June 17, 2020 21:04
-
-
Save ragingbal/ad448fdf286243da2c5ec6c0ee78d38c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import jinja2 | |
with open('Schema_CRM_ACCOUNTCONTRACT.json') as f: | |
data = json.load(f) | |
templateLoader = jinja2.FileSystemLoader(searchpath="./") | |
templateEnv = jinja2.Environment(loader=templateLoader) | |
TEMPLATE_FILE = "create_table.jinja" | |
template = templateEnv.get_template(TEMPLATE_FILE) | |
outputText = template.render(data=data) # this is where to put args to the template renderer | |
print(outputText) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment