def model_query(model, *args, **kwargs):
    'Query helper for simpler session usage.\n\n    :param session: if present, the session to use\n    '
    with _session_for_read() as session:
        query = session.query(model, *args)
        return query
Query helper for simpler session usage.

:param session: if present, the session to use
def model_query(model, *args, **kwargs):
    'Query helper for simpler session usage.\n\n    :param session: if present, the session to use\n    '
    with _session_for_read() as session:
        query = session.query(model, *args)
        return query