from pymongo import MongoClient
client = MongoClient()
# client = MongoClient('xxx.xxx.xxx.xxx')
db = client['databases_name'] # 获取数据库(database)
#db = Client.database_name
coll = db['collection_name'] # 获取Collection
#coll = db.collection_name
print coll
for data in coll.find(): print data
for data in coll.find({'key':value}): print data
for data in coll.find({'key1':value1, 'key2':value2}): print data