connexion.decorators.parameter

This module defines a decorator to convert request parameters to arguments for the view function.

Module Contents

Functions

inspect_function_arguments(function)

Returns the list of variables names of a function and if it

snake_and_shadow(name)

Converts the given name into Pythonic form. Firstly it converts CamelCase names to snake_case. Secondly it looks to

sanitized(name)

pythonic(name)

parameter_to_arg(operation, function, pythonic_params=False)

Pass query and body parameters as keyword arguments to handler function.

Attributes

logger

CONTEXT_NAME

connexion.decorators.parameter.logger
connexion.decorators.parameter.CONTEXT_NAME = context_
connexion.decorators.parameter.inspect_function_arguments(function)

Returns the list of variables names of a function and if it accepts keyword arguments.

Return type:

tuple[list[str], bool]

connexion.decorators.parameter.snake_and_shadow(name)

Converts the given name into Pythonic form. Firstly it converts CamelCase names to snake_case. Secondly it looks to see if the name matches a known built-in and if it does it appends an underscore to the name. :param name: The parameter name :type name: str :return:

connexion.decorators.parameter.sanitized(name)
connexion.decorators.parameter.pythonic(name)
connexion.decorators.parameter.parameter_to_arg(operation, function, pythonic_params=False)

Pass query and body parameters as keyword arguments to handler function.

See (https://github.com/zalando/connexion/issues/59) :param operation: The operation being called :type operation: connexion.operations.AbstractOperation :param pythonic_params: When True CamelCase parameters are converted to snake_case and an underscore is appended to any shadowed built-ins :type pythonic_params: bool