What's the goal of this learning?
Quickly get hands dirty with the concepts of MongoDB by using Python
Setup
What is MongoDB Atlas?
It is a cloud service provided by MongoDB, and I will utilize this cloud instance instead of a local one. I signed up for it at the following URL using my Google account to avail free subscription.
Create a cluster
- To create cluster through UI follow this doc and you'll get the username and password
- [Optional] To create cluster using CLI
- First, install Atlas CLI
- brew install mongodb-atlas
- Connect the Atlas CLI to account
- atlas auth login
- atlas clusters create [name]
- atlas clusters create siddesh
PyMongo - The Python MongoDB Driver library
- pip install pymongo
Compass - GUI application
- Refer this page for installation
Python Code
- Refer my Github URL https://github.com/siddeshbg/my-mongodb/blob/main/pymongo_usage.py for working code