zemfrog.decorators

Module Contents

Functions

http_code(func: Callable) → Callable

Decorator to generate HTTP status response code automatically

api_doc(**kwds) → Callable

Decorator for adding API documentation through the documentation in the view function.

jwt_required(roles={}) → Callable

Decorator to protect views with JWT & user roles.

authenticate(roles={}) → Callable

Decorator to add jwt view authentication to API Docs.

zemfrog.decorators.http_code(func: Callable)Callable[source]

Decorator to generate HTTP status response code automatically according to the key code in json.

Parameters

func – Your view function.

zemfrog.decorators.api_doc(**kwds)Callable[source]

Decorator for adding API documentation through the documentation in the view function.

zemfrog.decorators.jwt_required(roles={})Callable[source]

Decorator to protect views with JWT & user roles.

zemfrog.decorators.authenticate(roles={})Callable[source]

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.