def route_edit(): name=request.form.get("name") couple=ast.literal_eval(request.form.get("couple")) content = json.loads(dumps(db.getInstance().update_country_by_name(name, couple))) return content
def route_categorize(): content = json.loads(dumps(db.getInstance().get_countries_class())) return content
def route_remove(): name=request.get_data().decode().split('=')[1] content = json.loads(dumps(db.getInstance().delete_country_by_name(name))) return content
def route_add(): name=(request.get_data().decode().split('=')[1]) content = json.loads(dumps(db.getInstance().set_country(name))) return content
def route_request(name: str): content = json.loads(dumps(db.getInstance().get_country_by_name(name))) return content
def route_density_slice(): content = json.loads(dumps(db.getInstance().get_density_slice())) return content
def route_fake_country(fake_name: str): content = json.loads(dumps(db.getInstance().add_fake_country(fake_name))) return content