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
Metadata
Release files for wtoolzexceptions 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wtoolzexceptions-0.1.0.tar.gz | 7.1 kB | Without provenance | Details for wtoolzexceptions-0.1.0.tar.gz |
Release files / wtoolzexceptions-0.1.0.tar.gz
| Download URL | wtoolzexceptions-0.1.0.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c09826dbc729d962a1eb3e936a54309605651650c0fdb9439dea2de8fb3990b
|
|
BLAKE2b-256 checksum How to use checksums |
a4d7d9d3228395e34664a3b8810792132df1bbed00f67ca21ab6b9dcde8cb83f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Security for wtoolzexceptions 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.