API Documentation¶
This module contains helper functions that help you model your API responses consistently using the JSend specification.
-
class
jsendit.respond.
JSendStatus
[source]¶ Bases:
enum.Enum
- Variables
-
ERROR
= 'error'¶
-
FAIL
= 'fail'¶
-
SUCCESS
= 'success'¶
-
jsendit.respond.
response
(status: jsendit.respond.JSendStatus, message: str = None, data: Mapping[str, Any] = None)[source]¶ Construct a JSend response message.
- Parameters
status – the general status or HTTP code
message – the response message
data – additional response data
- Returns
the response message