<commit_before>import requests
from collections import namedtuple


DEFAULT_API_URL = 'http://localhost:5000'


# TODO: Covert to SDK and use in plugins
class Api:

	def __init__(self, token, url=DEFAULT_API_URL):
		self.token = token
		self.url = url

	def call(self, method, path, **kwargs):
		full_url = self.url + path
		params = kwargs
		params['token'] = self.token
		return requests.request(method, full_url, params=params)

	def get(self, path, **kwargs):<commit_msg>probably there won't be Python SDK to avoid dependencies<commit_after>import requests
from collections import namedtuple


DEFAULT_API_URL = 'http://localhost:5000'


class Api:

	def __init__(self, token, url=DEFAULT_API_URL):
		self.token = token
		self.url = url

	def call(self, method, path, **kwargs):
		full_url = self.url + path
		params = kwargs
		params['token'] = self.token
		return requests.request(method, full_url, params=params)

	def get(self, path, **kwargs):
{'fraction_non_alphanumeric': 0.11239495798319328, 'fraction_numerical': 0.008403361344537815, 'mean_word_length': 4.810975609756097, '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': '3807966', 'n_tokens_mistral': 328, 'n_tokens_neox': 299, 'n_words': 91}