Has anyone ever used SQLAlchemy query as data producer ?
I'm looking for examples, can anybody share about it ?
Regards
On 22 nov, 12:34, Jonathan Schemoul <jonathan.schem...@gmail.com>
wrote:
In a code producer:
----------
from myapp.model import session, MyModel
def produce():
query = session.query(MyModel)
for item in query:
yield item
----------
It really doesn't get any simpler than that, it's just a basic
SQLAlchemy request.
Items will be flowed to the next component in your tube.
--
Mathieu