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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for eresponse-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffca316fbc8d11df4225ec8dc59b2da7118aefd76b172777dfbd50dabf9c7187 |
|
MD5 | b17478a71b6660e7c78f9fb551979507 |
|
BLAKE2b-256 | 05a9d9cb0c48bceeb0be4dd37d33c19869584ddb6503f0e00029f3741669eed8 |