#NEWLINE# def export_mdstore_to_mongo_db( mds , database , collection , sub_collection = '' ) : #NEWLINE# #INDENT# mdb = MDB ( database , collection , sub_collection = sub_collection ) #NEWLINE# mdb . reset ( ) #NEWLINE# mdb . primary_key = 'entity_id' #NEWLINE# for ( key , desc ) in mds . items ( ) : #NEWLINE# #INDENT# kwargs = { #NEWLINE# #INDENT# 'entity_description' : protect ( desc ) , #NEWLINE# #UNINDENT# } #NEWLINE# mdb . store ( key , ** kwargs )