def from_everything(everything, engine_or_session, limit=None, **kwargs):
if isinstance(everything, TextClause):<EOL><INDENT>return from_stmt(everything, engine_or_session, **kwargs)<EOL><DEDENT>if isinstance(everything, Table):<EOL><INDENT>return from_table(everything, engine_or_session, limit=limit, **kwargs)<EOL><DEDENT>if type(everything) is DeclarativeMeta:<EOL><INDENT>return from_object(everything, engine_or_session, limit=limit, **kwargs)<EOL><DEDENT>if isinstance(everything, Query):<EOL><INDENT>return from_query(everything, engine_or_session, limit=limit, **kwargs)<EOL><DEDENT>if isinstance(everything, Select):<EOL><INDENT>return from_sql(everything, engine_or_session, limit=limit, **kwargs)<EOL><DEDENT>if isinstance(everything, ResultProxy):<EOL><INDENT>return from_resultproxy(everything, **kwargs)<EOL><DEDENT>if isinstance(everything, list):<EOL><INDENT>return from_data(everything, **kwargs)<EOL><DEDENT>
Construct a Prettytable from any kinds of sqlalchemy query.

:type engine_or_session: Union[Engine, Session]

:rtype: PrettyTable

Usage::

    from sqlalchemy import select

    sql = select([t_user])
    print(from_everything(sql, engine))

    query = session.query(User)
    print(from_everything(query, session))

    session.query(User)