zemfrog.decorators
¶
Module Contents¶
Functions¶
|
Decorator to generate HTTP status response code automatically |
|
See here https://flask-smorest.readthedocs.io/en/latest/api_reference.html#flask_smorest.Blueprint.doc |
|
See here https://flask-smorest.readthedocs.io/en/latest/arguments.html |
|
See here https://flask-smorest.readthedocs.io/en/latest/response.html# |
|
See here https://flask-smorest.readthedocs.io/en/latest/pagination.html. |
|
See here https://flask-smorest.readthedocs.io/en/latest/etag.html |
|
Decorator to protect views with JWT & user roles. |
|
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
(*args, **kwds) → Callable[source]¶ See here https://flask-smorest.readthedocs.io/en/latest/api_reference.html#flask_smorest.Blueprint.doc
-
zemfrog.decorators.
use_kwargs
(*args, **kwds) → Callable[source]¶ See here https://flask-smorest.readthedocs.io/en/latest/arguments.html
-
zemfrog.decorators.
marshal_with
(*args, **kwds) → Callable[source]¶ See here https://flask-smorest.readthedocs.io/en/latest/response.html#
-
zemfrog.decorators.
paginate
(*args, **kwds) → Callable[source]¶ See here https://flask-smorest.readthedocs.io/en/latest/pagination.html.
-
zemfrog.decorators.
etag
(schema=None) → Callable[source]¶ See here https://flask-smorest.readthedocs.io/en/latest/etag.html
-
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.