Did I find the right examples for you? yes no

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)
Get a list of the names of all databases on the connected server.
        

src/m/o/MongoHub-HEAD/Resources/mongodb.py   MongoHub(Download)
    def show_dbs(self, host, port):
        try:
            c = MongoConnection(host=host, port=int(port), pool_size=1)
            dbs = c.database_names()
        except Exception, err:

src/m/o/mongomem-0.1/src/mongomem.py   mongomem(Download)
    MB_PER_PAGE = float(PAGE_SIZE) / float(1024 * 1024)
 
    for db in conn.database_names():
        # load fincore details for all of that DB's files
        files = glob.glob(DB_FILE_PTRN.format(os.path.abspath(dbpath), db))

src/s/d/sd-agent-HEAD/checks.py   sd-agent(Download)
				status['dbStats'] = {}
 
				for database in conn.database_names():
 
					if database != 'config' and database != 'local' and database != 'admin' and database != 'test':

src/m/o/mongotools-HEAD/mongojitter.py   mongotools(Download)
        raise Exception('%s:%s is master' % (slave_host, slave_port))
 
    dbs = set(slave.database_names()) - SKIP_DBS
    print '%-40s %s' % ('<source>.<database>.<stat>', 'difference')
    print '-' * 40, '-' * 10