dora.server.returns_json

dora.server.returns_json(f)

A decorator for Flask route handlers that return JSON.

Any route handler decorated by this function needs to return a pair (dictionary, status code). The dictionary is automatically converted into a JSON string. The status code is an integer. The content type of the response is automatically set to JSON.

Previous topic

dora.server.get_query

Next topic

dora.server.predict