Skip to main content

Handler mixin for writing JSON errors

Version Downloads Status Coverage License

Installation

sprockets.mixins.json_error is available on the Python Package Index and can be installed via pip or easy_install:

pip install sprockets.mixins.json_error

Documentation

https://sprocketsmixinsjson_error.readthedocs.org

Requirements

Example

This examples demonstrates how to use sprockets.mixins.json_error to format errors as JSON.

from sprockets import mixins.json_error
from tornado import web

class MyRequestHandler(json_error.JsonErrorMixin,
                       web.RequestHandler):

    def get(self, *args, **kwargs):
        raise web.HTTPError(404, log_message='My reason')

The response from the handler will automatically be formatted as:

{
    "message": "My reason",
    "type": "Not Found"
}

Version History

Available at https://sprocketsmixinsjson_error.readthedocs.org/en/latest/history.html

Release files for sprockets.mixins.json_error 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sprockets.mixins.json_error 1.0.0
File Size Uploaded
sprockets.mixins.json_error-1.0.0.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sprockets.mixins.json_error 1.0.0
File Interpreter ABI Platform
sprockets.mixins.json_error-1.0.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 12.2 kB

Release files / sprockets.mixins.json_error-1.0.0.tar.gz

Download URL sprockets.mixins.json_error-1.0.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e957906f8671c64ac01b87eb7aba7000542dfd98f6b8bbc13b65699b0075977b
BLAKE2b-256 checksum
How to use checksums
2df83b71e9a7763410d9240192ea860ac3ca7fe1b11d06e83a585fd593b5aa90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / sprockets.mixins.json_error-1.0.0-py2.py3-none-any.whl

Download URL sprockets.mixins.json_error-1.0.0-py2.py3-none-any.whl
Size 7.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4392b773459466d11ea59b144227b2c2499fb1d26ebc04a0c62998c02ad16b11
BLAKE2b-256 checksum
How to use checksums
614b994a3405513066edeea64c8f46973a12c9b96fdf94b21e420b7fc1f4b4ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page