(model, *args, **kwargs)
return query
Query helper for simpler session usage.

    :param session: if present, the session to use
Query helper for simpler session usage.
Query helper for simpler session usage .
def model_query(model, *args, **kwargs):
    """Query helper for simpler session usage.

    :param session: if present, the session to use
    """

    session = kwargs.get('session') or get_session()
    query = session.query(model, *args)
    return query
def model_query ( model , * args , * * kwargs ) : session = kwargs . get ( 'session' ) or get_session ( ) query = session . query ( model , * args ) return query