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 the following error:* > > >

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

2021-05-05 Thread Yaakov Bressler
*Query would be modified to the following:* a = session.query(GeneralBeqReq)\ .filter( GeneralBeqReq.c.BeqReqStatus == 1, # this doesn't look right, but whatevz GeneralBeqReq.is_id_valid() == True, # a bit redundant, but explicit is better than implicit )\ .all()

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): ...

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

2021-05-05 Thread Mike Bayer
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 the following error:* > > ImportError: Error importing 'PROJECT_NAME.database': > InvalidRequestError: Table 'FooBar' is already defined for

alembic autogenerate tries to generate existing tables.

2021-05-05 Thread Johannes Bretscher
Hello, I am new to alembic and expect this to have a simple solution, but with my limited knowledge I can't find it. I have a database, genereted from scratch with sqlalchemy in postgresql. After that I wanted to try the alembic autogenerate tool. I initialize in env.py with exactly the same

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

2021-05-05 Thread Yaakov Bressler
Stack Overflow Link: https://stackoverflow.com/questions/67393499/sqlalchemy-error-when-autogenerating-documentation-for-database-module-using-pdo I'm creating documentation for a project using pydoc3 but am encountering an odd error from SQLAlchemy when running against my `database` module.