flask_parameters.inject_query_params¶
- flask_parameters.inject_query_params(ignore_args: List[str] = [])¶
Decorator that injects URL query parameters into flask a route function.
Injected parameters will always be strings unless the parameter is not supplied and the default value of a kwarg is used. Parameters are always injected as named arguments, so you don’t need to be as careful in which order you use this decorator.
- Parameters:
ignore_args (list[str] = []) – A list of argument names to ignore when checking for extra and missing arguments in the URL query parameters. E.g. if you have another decorator function injecting arguments.
- Raises:
ArgsException – If any missing or extra arguments are supplied in the URL query parameters.