[sqlalchemy] Re: SQLAlchemy with MySQL on AWS Lambda is taking long time to truncate table

2022-12-13 Thread Yaakov Bressler
Is it possible your sessions hasn't committed the change / closed the transaction? Also, I don't think dispose is helping you here. Consider removing it? How about modifying: def add_user(): session = Session() session.add(User(**{'user_id': 1, 'name': 'user name'}))

Re: [sqlalchemy] Difference between SQLAlchemy Select and Query API

2022-07-03 Thread Yaakov Bressler
Thanks for the detailed explanation Mike. My overall takeaway -> "select" makes more sense, for a variety of reasons. (It is also slightly faster, but that is an aside.) On Sunday, July 3, 2022 at 1:24:20 PM UTC-4 Mike Bayer wrote: > > > On Sun, Jul 3, 2022, at 10:41 AM,

[sqlalchemy] Difference between SQLAlchemy Select and Query API

2022-07-03 Thread Yaakov Bressler
*I saw the following Q posted on SO:* Difference between SQLAlchemy Select and Query API Not sure if this has been asked before, but in the SQLAlchemy docs

Re: [sqlalchemy] How to use user defined python function inside a sqlalchemy filter?

2021-05-07 Thread Yaakov Bressler
> If you can't express your validation function as an SQL expression, > you can't pass it to Query. You'd have to postprocess the query > results in python instead, like this: > > a = session.query(GeneralBeqReq)\ > .filter(GeneralBeqReq.c.BeqReqStatus == 1)\ > .all() &

Re: [sqlalchemy] SQLAlchemy error when autogenerating documentation for database module using pdoc3

2021-05-05 Thread Yaakov Bressler
Will do, will follow up with results. On Wednesday, May 5, 2021 at 11:25:58 AM UTC-4 Mike Bayer wrote: > > > On Wed, May 5, 2021, at 11:18 AM, Yaakov Bressler wrote: > > *But when I try generating documentation for the entire project * > *(`MODULE='.'`)**, I get t

Re: [sqlalchemy] How to use user defined python function inside a sqlalchemy filter?

2021-05-05 Thread Yaakov Bressler
() On Wednesday, May 5, 2021 at 11:26:01 AM UTC-4 Yaakov Bressler wrote: > Would it be wrong to assume that the desired function could be added as a > hybrid > attribute <https://docs.sqlalchemy.org/en/14/orm/extensions/hybrid.html>, > then queried through the class obj? >

Re: [sqlalchemy] How to use user defined python function inside a sqlalchemy filter?

2021-05-05 Thread Yaakov Bressler
Would it be wrong to assume that the desired function could be added as a hybrid attribute , then queried through the class obj? *Example:* from sqlalchemy.ext.hybrid import hybrid_property class *GeneralBeqReq*(Base): ...

[sqlalchemy] SQLAlchemy error when autogenerating documentation for database module using pdoc3

2021-05-05 Thread Yaakov Bressler
ave autogenerated documentation for the database modules. If so, what are some best practices? *Much appreciated! I look forward to any assistance ya'll can provide!* *-Yaakov Bressler* -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post exam

[sqlalchemy] Contributing to SQLAlchemy maintenance or source code

2020-12-21 Thread Yaakov Bressler
Hi SQLAlchemists! I've been using SQLAlchemy pretty steadily and would like to contribute in whatever way would be helpful. Perhaps there are maintenance duties or source code enhancements I could perhaps participate with? -Yaakov -- SQLAlchemy - The Python SQL Toolkit and Object Relational