def _create_record_with_sa(engine, resource_type, attributes):
 sa_table = db_utils.get_table(engine, 'standardattributes')
 sa_record = engine.execute(sa_table.insert().values({'resource_type': resource_type}))
 attributes['standard_attr_id'] = sa_record.inserted_primary_key[0]
 resource_table = db_utils.get_table(engine, resource_type)
 engine.execute(resource_table.insert().values(attributes))

def _create_record_with_sa ( engine , resource_type , attributes ) : sa_table = db_utils . get_table ( engine , 'standardattributes' ) sa_record = engine . execute ( sa_table . insert ( ) . values ( { 'resource_type' : resource_type } ) ) attributes [ 'standard_attr_id' ] = sa_record . inserted_primary_key [ 0 ] resource_table = db_utils . get_table ( engine , resource_type ) engine . execute ( resource_table . insert ( ) . values ( attributes ) )
create a record with standard attributes .