Skip to main content

Build Status Coverage Status

drf-buzz

This is an extension of the py-buzz package.

It adds extra functionality especially for DRF. Predominately, it adds the ability to jsonify an exception

Installation

pip install drf-buzz

Usage

Add drf-buzz exception handler in settings.py:

REST_FRAMEWORK = {
    ...
    'EXCEPTION_HANDLER': 'drf_buzz.exception_handler'
    ...
}

Use py-buzz exceptions in your DRF viewsets:

import drf_buzz

from rest_framework import status, viewsets


class MyException(drf_buzz.DRFBuzz):
    status_code = status.BAD_REQUEST


class MyViewSet(viewsets.ViewSet):
    def list(self, request):
        raise MyException('Not implemented yet.')

Tests

To run the test suite execute the following command in package root folder:

python setup.py test

Metadata

Release files for drf-buzz 0.3.0

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

Built distribution (wheel)

Table of built distributions (wheels) for drf-buzz 0.3.0
File Interpreter ABI Platform Actions
drf_buzz-0.3.0-py3-none-any.whl Python 3 none any Details for drf_buzz-0.3.0-py3-none-any.whl

Release files / drf_buzz-0.3.0-py3-none-any.whl

Download URL drf_buzz-0.3.0-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cbef4c39bc7dc4234d313effa009bd8d9589cb0ae081dd4464b4c5d0dd7b2d07
BLAKE2b-256 checksum
How to use checksums
ee4facb169d0dc5b29ea710fa0c0154092d218901e859fac3d1150590d472a12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.6.8

Security for drf-buzz 0.3.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.

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