Question: 3. Next, you must develop a Python module in a PY file, using object-oriented programming methodology, to enable CRUD functionality for the database. To support

3. Next, you must develop a Python module in a PY file, using object-oriented programming methodology, to enable CRUD functionality for the database. To support code reusability, your Python code needs to be importable as a module by other Python scripts. Develop a CRUD class that, when instantiated, provides the following functionality: o A Create method that inserts a document into a specified MongoDB database and collection Input -> argument to function will be a set of key/value pairs in the data type acceptable to the MongoDB driver insert API call. Return -> "True" if successful insert, else "False". A Read method that queries for document(s) from a specified MongoDB database and specified collection Input -> arguments to function should be the key/value lookup pair to use with the MongoDB driver find API call. Return -> result in cursor if successful, else MongoDB returned error message. o An Update method that queries for and changes document(s) from a specified MongoDB database and specified collection Input -> arguments to function should be the key/value lookup pair to use with the MongoDB driver find API call. Last argument to function will be a set of key/value pairs in the data type acceptable to the MongoDB driver insert API call. Return -> result in JSON format if successful, else MongoDB returned error message. A Delete method that queries for and removes document(s) from a specified MongoDB database and specified collection Input -> arguments to function should be the key/value lookup pair to use with the MongoDB driver find API call. Return -> result in JSON format if successful, else MongoDB returned error message. As you develop your code, be sure to use industry standard best practices such as proper naming conventions, exception handling, and in- line comments. This will ensure that your code is easy to read and reusable for future projects. Refer to the Python Style Guide, located in the Supporting Materials section, to help with these industry standard best practices. Note: If you completed the Module Four Milestone, you have already developed the Create and Read functionality. 4. Finally, you must test your Python module to make sure that it works. To do this, create a Python script that imports your CRUD Python module to call and test all instances of CRUD functionality. This script should be created in a separate Jupyter Notebook (IPYNB) file, and should import and instantiate an object from your CRUD library to effect changes in MongoDB. Be sure to use the username and password for the "aacuser account for authentication when instantiating the class. After creating your script, execute it in Jupyter Notebook and take screenshots of the commands and their execution. These screenshots will later be included in your README file
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
