At the beginning of this project, I will provide you with access to a cloud-based computer with MongoDB and Python 3 installed. I will also provide you with a read-write deploy key for a private GitHub repository. The GitHub repository will contain two .json files. Each file will consist of a list of dicts.
Your task will be to implement the following two Python functions:
'''Check out a copy of the GitHub repo into a temp directory. For each .json file in the repo, create or replace a collection in MongoDB whose name is the same as the .json file with the contents of the .json file. For example, create or replace the contents of "my_collection" with the contents of "[login to view URL]".'''
'''Check out a copy of the GitHub repo into a temp directory. For each collection, update or replace the existing .json file with the items in the collection. For example, create or replace the contents of '[login to view URL]' with the records inside the MongoDB collection "my_collection". Commit the new/changed .json files and push to GitHub.'''
- Create temp directories using the 'tempfile' library.
- Interact with GitHub using pygit2 ([login to view URL])
- Interact with MongoDB using PyMongo ([login to view URL])
- No calls to popen or other low-level OS functions. Everything should work via high-level APIs.
- No shell scripting; everything should be in the Python file.
- No duplicate code: any code that's used in two places should be factored out.
13 freelancers are bidding on average $168 for this job
Hello! I am a python developer. I looked at your project and it seems interesting. I have all necessary skills required for this project. Ping me to discuss in detail.