Skip to main content

A tiny python lib for decorating all view functions of a flask blueprint.

install

pip install blueprint-decr

usage

# api_blueprint is a blueprint object

import functools
def dummy_decr(func):
    @functools.wraps(func)
    def wrapper(*sub, **kw):
        print(func.__name__)
        return func(*sub, **kw)
    return wrapper


import blueprint_decr

new_api_blueprint = blueprint_decr.attach(api_blueprint, dummy_decr)

# now, you may register new_api_blueprint with flask app object.
# app.register_blueprint(new_api_blueprint, url_prefix='/api')

Release files for blueprint-decr 0.1.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 blueprint-decr 0.1.1
File Size Uploaded
blueprint-decr-0.1.1.tar.gz 1.7 kB Details

Release files / blueprint-decr-0.1.1.tar.gz

Download URL blueprint-decr-0.1.1.tar.gz
Size 1.7 kB
Tags Source
SHA-256 checksum
How to use checksums
afa40fd5e20b3c06383bd438b759dd10780d87f2715c56145268499ed2a8da3a
BLAKE2b-256 checksum
How to use checksums
2b94221409d69b5f298e19ce7b450fa32ce3f8a5ff892e98c0cc54e4db87a6d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1.0

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