def save_assets_to_db(instruments): make_psycopg_green() log.info("saving new supported instruments to database") build_instruments(instruments) log.info("all new instruments saved to DB")
def get_assetid_occlassid_ocid_tuples(): make_psycopg_green() session = Session() asset_class_inst_tuples = session.query(OCAsset.asset_id, OCAsset.oc_class_id, OCAsset.oc_id).all() session.close() return asset_class_inst_tuples