def is_like_list(model_or_instance, relationname):
 if (not inspect.isclass(model_or_instance)):
  model = get_model(model_or_instance)
 else:
  model = model_or_instance
 mapper = sqlalchemy_inspect(model)
 relation = mapper.all_orm_descriptors[relationname]
 if isinstance(relation, AssociationProxy):
  relation = relation.local_attr
 return relation.property.uselist

def is_like_list ( model_or_instance , relationname ) : if ( not inspect . isclass ( model_or_instance ) ) : model = get_model ( model_or_instance ) else : model = model_or_instance mapper = sqlalchemy_inspect ( model ) relation = mapper . all_orm_descriptors [ relationname ] if isinstance ( relation , AssociationProxy ) : relation = relation . local_attr return relation . property . uselist
decides whether a relation of a sqlalchemy model is list-like .