:mod:`zemfrog.decorators` ========================= .. py:module:: zemfrog.decorators Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: zemfrog.decorators.http_code zemfrog.decorators.api_doc zemfrog.decorators.jwt_required zemfrog.decorators.authenticate .. function:: http_code(func: Callable) -> Callable Decorator to generate HTTP status response code automatically according to the key ``code`` in json. :param func: Your view function. .. function:: api_doc(**kwds) -> Callable Decorator for adding API documentation through the documentation in the view function. .. function:: jwt_required(roles={}) -> Callable Decorator to protect views with JWT & user roles. .. function:: authenticate(roles={}) -> Callable Decorator to add jwt view authentication to API Docs. Reference: https://github.com/tiangolo/full-stack-flask-couchdb/tree/master/%7B%7Bcookiecutter.project_slug%7D%7D/backend/app/app/api/api_v1.