Skip to content

Instantly share code, notes, and snippets.

@app.route("/add-shopify", methods=["POST"])
def add_shopify():
with open("config.json") as json_data_file:
data = json.load(json_data_file)
shopifyLinks = data['shopifySitemapLinks']
linkToAdd = # I want this to be the input from the /command [input]
data['shopifySitemapLinks'].append(linkToAdd)
json.dump(data, sys.stdout, indent=2)