def fetch_key(self):
        obj = json.loads(self.request.body.decode('utf-8'))
        key = uuid.uuid4().hex

        # if key id was passed in obj, remove it
        if "key" in obj:
            del obj['key']

        # parent key ?
        parent = None
        if "parent" in obj:
            parent = obj.pop('parent')

        return key, obj, parent
dataset/ETHPy150Open benoitc/gaffer/gaffer/gafferd/http_handlers/keys.py/KeysHandler.fetch_key/original