I was poking around Elixir's Ecto <https://hexdocs.pm/ecto/Ecto.html>, and I was curious whether it was possible to apply their strict separation between data and operations to SQLAlchemy. One could imagine an API where session.query fetches mutable, data-only versions of models, and models are updated with something like session.update(model), which would be a proxy for update(Model).where(Model.id == model.id). In that scenario, the only stateful element of the session would be the status of the current transaction.
Is this sort of thing possible? Can the declarative API be used without binding model classes to a session? Can session state management be turned off, or could the connection be used directly? Thanks, Max -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.