Skip to main content

Changes standard flask and jwt errors format

Project description

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.

{
  "code": 404,
  "status": "Not Found"
}

to:

{
  "errors": {
    "json": {
      "url": [
        "Does not exist."
      ]
    }
  }
}

Installing

Install and update using pip:

$ pip install flask-errors-as-nested-dicts

Usage

from flask import Flask
from flask_jwt_extended import JWTManager

app = Flask(__name__)
jwt = JWTManager(app)
ErrorsAsNestedDicts(app, jwt)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask-errors-as-nested-dicts-0.0.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file flask-errors-as-nested-dicts-0.0.1.tar.gz.

File metadata

  • Download URL: flask-errors-as-nested-dicts-0.0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6

File hashes

Hashes for flask-errors-as-nested-dicts-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b4275cc004f02e507020e10bfcb084feb67b679899e84ed9339f14d07b592837
MD5 3c01d1ab2b41007d5092bbb368f67ee4
BLAKE2b-256 bd896ac29ea5c384107bb61de4e9d18076d6d31726d44c5ce7555ba3026fc89c

See more details on using hashes here.

File details

Details for the file flask_errors_as_nested_dicts-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: flask_errors_as_nested_dicts-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.6

File hashes

Hashes for flask_errors_as_nested_dicts-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a75049e7bb1ce119531fe14e0bf2a0cbfba2c7bdbe925a2c63b58de936e3b9a1
MD5 60239bc10e2a1d4c8d63deeef796ad29
BLAKE2b-256 e21635c65c6bb08ee182f80c22db322f2c2d9ffaaceb084ec3d5b62a337d23ad

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page