Skip to main content

wtoolzexceptions contains core exception logic for web applications.

Project description

wtoolzexceptions

wtoolzexceptions contains core exception logic for web applications

Installation | Getting Up And Running | Examples | API | See Also

wtoolzexceptions contains core exception logic for web applications. The main feature are:

  • Contains error and exception classes and

  • abort function.

Installation

pip install wtoolzexceptions

Getting Up and Running

nox -l

Examples

import flask

from wtoolzexceptions import exceptions

app = flask.Flask(__name__)

@app.errorhandler(exceptions.HTTPException)
def handle_it(e):
    res = flask.jsonify(self.to_dict())
    res.status_code = self.http_status_code
    return res

@app.route("/me")
def boom_me():
    raise exceptions.Forbidden()

# When calling /me you will now get 404 status code and JSON response
# as {"error": {"code": "XY", "message": "xy"}}.

API

FIXME

See Also

FIXME

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

wtoolzexceptions-0.1.0.tar.gz (7.1 kB view details)

Uploaded Source

File details

Details for the file wtoolzexceptions-0.1.0.tar.gz.

File metadata

  • Download URL: wtoolzexceptions-0.1.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.9

File hashes

Hashes for wtoolzexceptions-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2c09826dbc729d962a1eb3e936a54309605651650c0fdb9439dea2de8fb3990b
MD5 0e1b7251da8def945c48a81fc6bce9f9
BLAKE2b-256 a4d7d9d3228395e34664a3b8810792132df1bbed00f67ca21ab6b9dcde8cb83f

See more details on using hashes here.

Supported by

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