<commit_before>"""
webob resource
"""
import logging
import uuid
from zunzuncito import tools
from webob import Request


class APIResource(object):

    def __init__(self, api):
        self.api = api
        self.log = logging.getLogger()
        self.log.info(tools.log_json({
            'vroot': api.vroot,
            'API': api.version,
            'URI': api.URI,
            'method': api.method
        }, True)
        )

    def dispatch(self, environ):
        req = Request(environ)

        data = {}
        data['req-GET'] = req.GET
        data['req-POST'] = req.POST
        data['req-application_url'] = req.application_url
        data['req-body'] = req.body
        data['req-content_type'] = req.content_type
        data['req-cookies'] = req.cookies
        data['req-method'] = req.method
        data['req-params'] = req.params
        data['req-path'] = req.path
        data['req-path_info'] = req.path_info
        data['req-path_qs'] = req.path_qs
        data['req-path_url'] = req.path_url<commit_msg>	modified:   zun_webob.py<commit_after>"""
webob resource
"""

import logging
import uuid

from webob import Request
from zunzuncito import tools


class APIResource(object):

    def __init__(self, api):
        self.api = api
        self.log = logging.getLogger()
        self.log.info(tools.log_json({
            'vroot': api.vroot,
            'API': api.version,
            'URI': api.URI,
            'method': api.method
        }, True)
        )

    def dispatch(self, environ):
        req = Request(environ)

        data = {}
        data['req-GET'] = req.GET
        data['req-POST'] = req.POST
        data['req-application_url'] = req.application_url
        data['req-body'] = req.body
        data['req-content_type'] = req.content_type
        data['req-cookies'] = req.cookies
        data['req-method'] = req.method
        data['req-params'] = req.params
        data['req-path'] = req.path
        data['req-path_info'] = req.path_info
        data['req-path_qs'] = req.path_qs
        data['req-path_url'] = req.path_url
{'fraction_non_alphanumeric': 0.14134615384615384, 'fraction_numerical': 0.0, 'mean_word_length': 2.1152694610778444, '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': '4726515', 'n_tokens_mistral': 659, 'n_tokens_neox': 656, 'n_words': 129}