<commit_before>from dlcs.queue_response import Batch
from requests import post, auth
import settings


def register_collection(image_collection):

    authorisation = auth.HTTPBasicAuth(settings.DLCS_API_KEY, settings.DLCS_API_SECRET)
    url = settings.DLCS_ENTRY + 'customers/' + str(settings.DLCS_CUSTOMER_ID) + '/queue'
    json = image_collection.as_json()
    response = post(url, json=json, auth=authorisation)
    batch = Batch(response.json())

    return batch<commit_msg>fix for correct json data to use.<commit_after>from dlcs.queue_response import Batch
from requests import post, auth
import settings


def register_collection(image_collection):

    authorisation = auth.HTTPBasicAuth(settings.DLCS_API_KEY, settings.DLCS_API_SECRET)
    url = settings.DLCS_ENTRY + 'customers/' + str(settings.DLCS_CUSTOMER_ID) + '/queue'
    json = image_collection.to_json_dict()
    response = post(url, json=json, auth=authorisation)
    batch = Batch(response.json())

    return batch
{'fraction_non_alphanumeric': 0.09403437815975733, 'fraction_numerical': 0.0, 'mean_word_length': 5.1875, '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': '1013853', 'n_tokens_mistral': 311, 'n_tokens_neox': 304, 'n_words': 67}