cl = MongoClient()
coll = cl['local']['test2']
data = [{'_id': 1, 'foo': 'HELLO'}, {'_id': 2, 'Blah': 'Bloh'}]
for d in data:
    coll.update({'_id': d['_id']}, d, True)
Python — вставка и обновление документов Pymongo