def resource_data_get_by_key(context, resource_id, key):
 result = context.session.query(models.ResourceData).filter_by(resource_id=resource_id).filter_by(key=key).first()
 if (not result):
  raise exception.NotFound(_('No resource data found'))
 return result

def resource_data_get_by_key ( context , resource_id , key ) : result = context . session . query ( models . ResourceData ) . filter_by ( resource_id = resource_id ) . filter_by ( key = key ) . first ( ) if ( not result ) : raise exception . NotFound ( _ ( 'No resource data found' ) ) return result
looks up resource_data by resource_id and key .