<commit_before>from flask import current_app, g
from datetime import datetime
from land_register_api.app import app
from land_register_api.exceptions import ApplicationError
import json
import requests


class AuditAPI(object):
    """Encapsulating class for Audit API access."""
    def __init__(self):
        self.base_url = current_app.config["AUDIT_API_URL"]
        self.version = current_app.config["AUDIT_API_VERSION"]
        self.timeout = current_app.config["TIMEOUT"]

    def create(self, activity):
        """Create a new audit record."""
        url = '{0}/{1}/records'.format(self.base_url, self.version)
        record = {
            "activity": activity,
            "activity_timestamp": str(datetime.now().isoformat()),
            "origin_id": current_app.config['APP_NAME'],
            "component_name": current_app.config['APP_NAME'],
            "business_service": "Land Register Service"
        }<commit_msg>business service<commit_after>from flask import current_app, g
from datetime import datetime
from land_register_api.app import app
from land_register_api.exceptions import ApplicationError
import json
import requests


class AuditAPI(object):
    """Encapsulating class for Audit API access."""
    def __init__(self):
        self.base_url = current_app.config["AUDIT_API_URL"]
        self.version = current_app.config["AUDIT_API_VERSION"]
        self.timeout = current_app.config["TIMEOUT"]

    def create(self, activity):
        """Create a new audit record."""
        url = '{0}/{1}/records'.format(self.base_url, self.version)
        record = {
            "activity": activity,
            "activity_timestamp": str(datetime.now().isoformat()),
            "origin_id": current_app.config['APP_NAME'],
            "component_name": current_app.config['APP_NAME'],
            "business_service": "Title Service"
        }
{'fraction_non_alphanumeric': 0.11544628540887227, 'fraction_numerical': 0.002137894174238375, 'mean_word_length': 3.303448275862069, 'pattern_counts': {'":': 10, '<': 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': '2538536', 'n_tokens_mistral': 519, 'n_tokens_neox': 509, 'n_words': 122}