def flask(self,
              in_headers=False,
              url="http://demos.gsi.dit.upm.es/senpy/senpy.jsonld"):
        js = self.jsonld()
        headers = None
        if in_headers:
            ctx = js["@context"]
            headers = {
                "Link": ('<%s>;'
                         'rel="http://www.w3.org/ns/json-ld#context";'
                         ' type="application/ld+json"' % url)
            }
            del js["@context"]
        return FlaskResponse(json.dumps(js, indent=4),
                             status=self.get("status", 200),
                             headers=headers,
                             mimetype="application/json")
Return the values and error to be used in flask
dataset/ETHPy150Open gsi-upm/senpy/senpy/models.py/Leaf.flask