MCPcopy Create free account
hub / github.com/caesarHQ/textSQL / get_visualization

Function get_visualization

byod/api/app/visualization/routes.py:9–20  ·  view source on GitHub ↗

Get Vega-Lite spec from data

()

Source from the content-addressed store, hash-verified

7
8@bp.route("/viz", methods=["POST"])
9def get_visualization():
10 """
11 Get Vega-Lite spec from data
12 """
13 request_body = request.get_json()
14 data = request_body.get("data")
15
16 if not data:
17 return make_response(jsonify({"error": "`data` is missing from request body"}), 400)
18
19 vega_lite_spec = get_vega_lite_spec(data)
20 return make_response(jsonify({"vega_lite_spec": vega_lite_spec}), 200)
21
22
23@bp.route('/text_to_viz', methods=['POST'])

Callers

nothing calls this directly

Calls 1

get_vega_lite_specFunction · 0.85

Tested by

no test coverage detected