MCPcopy Create free account
hub / github.com/tiny-pilot/tinypilot / success

Function success

app/json_response.py:6–15  ·  view source on GitHub ↗

A JSON response for a successful request. Args: data: Dictionary with JSON properties to include. Returns: A `flask.Response` object with JSON body containing the serialized data.

(data={})

Source from the content-addressed store, hash-verified

4# The default dictionary is okay because we're not modifying it.
5# pylint: disable=dangerous-default-value
6def success(data={}):
7 """A JSON response for a successful request.
8
9 Args:
10 data: Dictionary with JSON properties to include.
11
12 Returns:
13 A `flask.Response` object with JSON body containing the serialized data.
14 """
15 return flask.jsonify(data)
16
17
18def error(original_error):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected