<jupyter_start><jupyter_text>Python Testing Script for crudTest.py This script is a Jupyter Notebook IPYNB file that import and instantiate an object from the file **crud.py** to effect changes in MongoDB.  User Authentication Import CRUD Python Module to call and test the instances of CRUD on the "AnimalShelter" class.and authenticate user in the specified MongoDB database "AAC".<jupyter_code>from crudTest import AnimalShelter
user = AnimalShelter('aacuser', 'cs340', 'AAC')<jupyter_output><empty_output><jupyter_text>Create Method Inserts documents into the specified MongoDB database "AAC" and collection "animals". Data shuould be a list of one or more dictionary.<jupyter_code>doc1 = [{'animal_type': 'Elephant', 'datetime': '2021-02-07', 'name': 'Testing'},
        {'animal_type': 'Panther', 'datetime': '2021-02-07', 'name': 'Testing2'}]
user.create(doc1)<jupyter_output><empty_output><jupyter_text>Read Method Queries to read documents from the specified MongoDB database "AAC" and specified collection "animals".<jupyter_code>doc2 = {'animal_type': {'$in': ['Elephant', 'Panther']}}
user.read(doc2)<jupyter_output><empty_output><jupyter_text>Update Method Queries to update documents from the specified MongoDB database "AAC" and specified collection "animals". The 4set query is required to have the key:value pair { 'update': 'true' }<jupyter_code>doc3 = ({'animal_type': 'Elephant', 'name': {'$ne':'Testing3'}}, {'$set': {'name': 'Testing3', 'update': 'true'}})
user.update(doc3)<jupyter_output><empty_output><jupyter_text>Delete method Queries to delete documents from the specified MongoDB database "AAC" and specified collection "animals".<jupyter_code>doc4 = {'name': {'$regex': '^Testing'}}
user.delete(doc4)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13011363636363638, 'fraction_numerical': 0.017613636363636363, 'mean_word_length': 7.548543689320389, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '272838', 'license': 'MIT', 'n_tokens_mistral': 587, 'n_tokens_neox': 550, 'n_words': 173, 'path': 'enhancement/CS340-databases/crud-test.ipynb', 'repo_name': 'arsari/ePortfolio-SNHU', 'size': '1760'}