Skip to main content

Response Formatter

This library will help you to work with flask application without hesitating responses and exception in routes.

How to use

  1. To get exceptions as response messages use like below. Make sure to set 'allow_exception=False'. Once you done you would be able work without breaking when exception comes. The exception will come as a response

    from make_response.format import response_format
    
    @app.route('/')
    @response_format(allow_exception=False)
    def hello_world():
        return {}, True, 200, 'message'
    
  2. For see the exceptions. Once you give 'allow_exception=True' it will allows to raise the exception and the app would brake as usual way.

    from make_response.format import response_format
    
    @app.route('/')
    @response_format(allow_exception=True)
    def hello_world():
        return {}, True, 200, 'message'
    

Metadata

Release files for make-response 1

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

Source distribution (sdist)

Source distribution for make-response 1
File Size Uploaded
make_response-1.tar.gz 2.7 kB Details

Release files / make_response-1.tar.gz

Download URL make_response-1.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
78711df4a47c967137083bf1a9020e4e758f6374fe4a408431d807ddbbedcc8f
BLAKE2b-256 checksum
How to use checksums
ad7125bd3f14e7f46ca75702cd3159be6e988e12eeab6f2139ffeefed028336b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.5

Release history Release notifications | RSS feed

This release

1 This release

1 release file

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