from flask import Flask, request, jsonify, Response, render_template import json app = Flask(__name__) # Rule of Ethical Magic #1: Do no harm def bookcase_is_blacklisted(bookcase_name): return bookcase_name in ["destruction","necromancy"] # Rule of Ethical Magic #2: Stay true to what is expected of you def action_is_whitelisted(action_name): return action_name in ["list","read"] # Rule of Ethical Magic #3: Disallow all tomfoolery def filter_blacklisted_chars(value): cleaned_input = "" blacklisted_chars = "';`$\"/ \r\n\t*>