def find_matching_url(request):
    if not request.method in REQUEST_MAPPINGS:
        raise NotFound("The HTTP request method '%s' is not supported." % request.method)

    for url_set in REQUEST_MAPPINGS[request.method]:
        match = url_set[0].search(request.path)

        if match is not None:
            return (url_set, match.groupdict())

    raise NotFound("Sorry, nothing here.")
Searches through the methods who've registed themselves with the HTTP decorators.
dataset/ETHPy150Open toastdriven/itty/itty.py/find_matching_url