mapper.py
def add(self, pattern, function, method=None, type_cast=None):
        """Function for registering a path pattern.

        Args:
            pattern (str): Regex pattern to match a certain path.
            function (function): Function to associate with this path.
            method (str, optional): Usually used to define one of GET, POST,
                PUT, DELETE. You may use whatever fits your situation though.
                Defaults to None.
            type_cast (dict, optional): Mapping between the param name and
                one of `int`, `float` or `bool`. The value reflected by the
                provided param name will than be casted to the given type.
                Defaults to None.
        """
        if not type_cast:
            type_cast = {}

        with self._lock:
            self._data_store.append({
                'pattern': pattern,
                'function': function,
                'method': method,
                'type_cast': type_cast,
            })
def add(self, pattern, function, method=None, type_cast=None):
        if not type_cast:
            type_cast = {}

        with self._lock:
            self._data_store.append({
                'pattern': pattern,
                'function': function,
                'method': method,
                'type_cast': type_cast,
            })
def add ( self , pattern , function , method = None , type_cast = None ) : if not type_cast : type_cast = { } with self . _lock : self . _data_store . append ( { 'pattern' : pattern , 'function' : function , 'method' : method , 'type_cast' : type_cast , } )
Function for registering a path pattern.

        Args:
            pattern (str): Regex pattern to match a certain path.
            function (function): Function to associate with this path.
            method (str, optional): Usually used to define one of GET, POST,
                PUT, DELETE. You may use whatever fits your situation though.
                Defaults to None.
            type_cast (dict, optional): Mapping between the param name and
                one of `int`, `float` or `bool`. The value reflected by the
                provided param name will than be casted to the given type.
                Defaults to None.
Function for registering a path pattern .