eresponse-1.0.1
توضیحات
-
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | eresponse-1.0.1 |
| نام | eresponse |
| نسخه کتابخانه | 1.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | beaxhem |
| ایمیل نویسنده | senchukov02@gmail.com |
| آدرس صفحه اصلی | http://github.com/Beaxhem/eresponse |
| آدرس اینترنتی | https://pypi.org/project/eresponse/ |
| مجوز | mit |
# EResponse
This is a simple package to form json response easily.
## Usage
```python
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
```json
{
"ok": true,
"message": "Success text",
"test": {
"key": 1
}
}
```
### Error
```json
{
"ok": false,
"error": "Error text"
}
```
نیازمندی
| مقدار | نام |
|---|---|
| - | flask |
نحوه نصب
نصب پکیج whl eresponse-1.0.1:
pip install eresponse-1.0.1.whl
نصب پکیج tar.gz eresponse-1.0.1:
pip install eresponse-1.0.1.tar.gz