pymongo - Connecting to Remote MongoDB Server with Python -


i have script wrote query mongodb in python using pymongo. trying use script connect remote mongodb server , run query within script , want able dump data mongodb file.

what parameters need have @ top of script connect database, use username , password, switch correct database , run query?

couple of options.

first provide mongodb uri can provided mongoclient argument. can switch needed using standard methods getting database once connected.

alternately, can connect normal, use getting database once connected method desired database , use authenticate function authenticate against database.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -