No project description provided
Project description
EResponse
This is a simple package to form json response easily.
Usage
from eresponse import new_success_message, new_error_message
def example():
try:
res = {
"key": 1
}
return new_success_message("Success text", test=res)
except Exception as e:
return new_error_message("Error text")
What it looks like in response
Success
{
"ok": true,
"message": "Success text",
"test": {
"key": 1
}
}
Error
{
"ok": false,
"error": "Error text"
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
eresponses-1.0.tar.gz
(1.9 kB
view hashes)