title: how to get list of all databases in a mongo instance using pymongo
body: <p>how to get the list of all the databases in a mongo instance to a variable using pymongo?</p>
  
  <p>for example to send following command to mongo instance using pymongo,</p>
  
  <p>db.adminCommand( { listDatabases: 1 } )</p>