flask-errors-as-nested-dicts-0.0.1
توضیحات
Changes standard flask and jwt errors format
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | flask-errors-as-nested-dicts-0.0.1 |
| نام | flask-errors-as-nested-dicts |
| نسخه کتابخانه | 0.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Rafael A. Bizao |
| ایمیل نویسنده | rabizao@gmail.com |
| آدرس صفحه اصلی | https://github.com/rabizao/flask-errors-as-nested-dicts |
| آدرس اینترنتی | https://pypi.org/project/flask-errors-as-nested-dicts/ |
| مجوز | - |
# Flask Errors as Nested Dicts
This extension was developed for personal use and changes standard flask and jwt response errors to nested dicts, i. e.
```javascript
{
"code": 404,
"status": "Not Found"
}
```
to:
```javascript
{
"errors": {
"json": {
"url": [
"Does not exist."
]
}
}
}
```
Installing
----------
Install and update using pip:
```bash
$ pip install flask-errors-as-nested-dicts
```
Usage
----------------
```python
from flask import Flask
from flask_jwt_extended import JWTManager
app = Flask(__name__)
jwt = JWTManager(app)
ErrorsAsNestedDicts(app, jwt)
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl flask-errors-as-nested-dicts-0.0.1:
pip install flask-errors-as-nested-dicts-0.0.1.whl
نصب پکیج tar.gz flask-errors-as-nested-dicts-0.0.1:
pip install flask-errors-as-nested-dicts-0.0.1.tar.gz