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

        Args:
            path (str): Path to be matched.
            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.
        """
        with self._lock:
            try:
                path = '^/{}'.format(path.lstrip('/'))
                path = '{}/$'.format(path.rstrip('/'))
                path = path.replace('<', '(?P<')
                path = path.replace('>', '>[^/]*)')

                self.add(path, function, method, type_cast)
            except Exception:
                pass
def s_add(self, path, function, method=None, type_cast=None):
        """Function for registering a simple path.

        Args:
            path (str): Path to be matched.
            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.
        """
        with self._lock:
            try:
                path = '^/{}'.format(path.lstrip('/'))
                path = '{}/$'.format(path.rstrip('/'))
                path = path.replace('<', '(?P<')
                path = path.replace('>', '>[^/]*)')

                self.add(path, function, method, type_cast)
            except Exception:
                pass
Function for registering a simple path.

        Args:
            path (str): Path to be matched.
            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.