@imageinfo.route('/create', methods=['post'])
def create():
    msg = {'err': None, 'res': None}
    try:
        body = yaml.load(request.data, Loader=yaml.Loader)
        k = f"{body['namespace']}/{body['name']}"
        v = json.dumps(body).encode()
        mydb.upsert(db_path, k, v)
    except Exception as e:
        logger.error(str(e))
        msg['err'] = str(e)
    return jsonify(msg)
@imageinfo.route('/create', methods=['post'])
def create():
    msg = {'err': None, 'res': None}
    try:
        body = yaml.load(request.data, Loader=yaml.Loader)
        k = f"{body['namespace']}/{body['name']}"
        v = json.dumps(body).encode()
        mydb.upsert(db_path, k, v)
    except Exception as e:
        logger.error(str(e))
        msg['err'] = str(e)
    return jsonify(msg)