All samples for the ORM part use a session to connect to the database, whereas all samples in the Core part use a connection. If I use both approaches in my app, does it make sense to execute the SQL Expression Language (Core) through session.execute() or is there a reason I should use connection.execute()?
For example, can I say:
from sqlalchemy.sql import select
from models import User
from main import session_scope
users = User.__table__
with session_scope() as session:
result = session.execute(select([users]))
session_scope() is a context manager as described
here.