Skip to main content

Exceptions for Gizwits PaaS

Project description

It's Exception lib for Gizwits PaaS Usage.

How to use


python >= 3 for now.


pip install giz-exceptions

config in

base on Django REST Framework

    'EXCEPTION_HANDLER': 'giz_exceptions.handler.custom_handler'


from rest_framework.views import APIView
from giz_exceptions.paas import exceptions

class MyView(APIView):
    def get(self, request, *args, **kwargs):
        if not self.request.condition:
            raise exceptions.ProductKeyInvalid
            # or with detail message
            # raise exceptions.ProductKeyInvalid('This required product key')

Project details

Download files

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

Files for giz-exceptions, version 0.0.8
Filename, size File type Python version Upload date Hashes
Filename, size giz_exceptions-0.0.8-py3-none-any.whl (7.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size giz_exceptions-0.0.8.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page