<commit_before>dict_object_differ
==================

Python library for comparing values from an object to a dictionary with selective attribute comparision

usage
=====

foo = {'foo': 'bar'}

bar = CustomObject()

""" compare map is a mapping of dictionary keys in dict_diff to object_diff

compare_map = {'foo': 'foo'}

dod = DictObjectDiffer(diff_dict=foo, diff_object=bar, compare_map=compare_map)

dod.compare()

dod.missing_from_dict # dictionary containing attributes found in object, but that are not present in the dict

dod.missing_from_object # dictionary containing dictionary keys found in object, but that are not present in the object

dod.dict_difference # dictionary containing the value of the attribute as found in the object

dod.object_difference # dictionary containing the value of the dictionary key as found in the dict
<commit_msg>Updates to README<commit_after>dict_object_differ
==================

Python library for comparing values from an object to a dictionary with selective attribute comparision

usage
=====

foo = {'foo': 'bar'}

bar = CustomObject()

compare map is a mapping of dictionary keys in dict_diff to object_diff

compare_map = {'foo': 'foo'}

dod = DictObjectDiffer(diff_dict=foo, diff_object=bar, compare_map=compare_map)

dod.compare()

dod.missing_from_dict # dictionary containing attributes found in object, but that are not present in the dict

dod.missing_from_object # dictionary containing dictionary keys found in object, but that are not present in the object

dod.dict_difference # dictionary containing the value of the attribute as found in the object

dod.object_difference # dictionary containing the value of the dictionary key as found in the dict

{'fraction_non_alphanumeric': 0.07867132867132867, 'fraction_numerical': 0.0, 'mean_word_length': 5.655038759689923, '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': '6996388', 'n_tokens_mistral': 460, 'n_tokens_neox': 447, 'n_words': 202}