Created
February 28, 2020 15:15
-
-
Save valiantone/3fff51fe6727d735b5dc889af5cc5075 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymongo | |
client = pymongo.MongoClient("mongodb://valiantone:secretPassword@123.45.67.89/my_db") # defaults to port 27017 | |
db = client.cool_db | |
# print the number of documents in a collection | |
print db.cool_collection.count() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment