<commit_before>"""

WSGI middleware  or application that  will route requests  to specific
resto object and resources.

"""

from wsgiref.simple_server import make_server


class Middleware(object):
    """WSGI middleware that will route to resources."""

    def __init__(self, environ, start_response):
        self.environ = environ
        self.start = start_response

    def __iter__(self):
        status = '200 OK'
        response_headers = [('Content-type', 'application/json')]
        self.start(status, response_headers)<commit_msg>WSGI Application object<commit_after>"""

WSGI middleware  or application that  will route requests  to specific
resto object and resources.

"""

from wsgiref.simple_server import make_server


class Application(object):
    """Resto applications are used to control your workspace.

    Main motivation behind having this class was having an entry point
    for resource discovery and resolution. With an Application object
    we can indicate where to find resources.

    """

    def __init__(self, root):
        """Initializes indicating root Python module.

        The application will look for all `Resource` classes defined
        in the given root module.

        """
        self._root = root


class Middleware(object):
    """WSGI middleware that will route to resources."""

    def __init__(self, environ, start_response):
        self.environ = environ
        self.start = start_response

    def __iter__(self):
        status = '200 OK'
        response_headers = [('Content-type', 'application/json')]
        self.start(status, response_headers)
{'fraction_non_alphanumeric': 0.08173374613003095, 'fraction_numerical': 0.0037151702786377707, 'mean_word_length': 3.2083333333333335, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2429603', 'n_tokens_mistral': 425, 'n_tokens_neox': 413, 'n_words': 154}