[sqlalchemy] Re: How to use sqlcodegen generate SQLModels

2023-03-22 Thread Val Huber
You might want to consider API Logic Server . It includes sqlacodegen, and uses it to build an executable project including an API and an Admin App. On Wednesday, March 22, 2023 at 3:55:20 PM UTC-7 Linson Abah wrote: > Hi, > I am trying to convert the sc

Re: [sqlalchemy] sqlacodegen giving Unknown database on mysql+pymysql

2023-02-27 Thread Val Huber
Hi, Andy I share your interest in sqlacodegen. I am using it heavily in API Logic Server, and did in fact need to make some changes. So, you might want to consider using it. If all goes well, you'll not only get your models.py, you'll get an API and an

Re: [sqlalchemy] Column vs InstrumentedAttribute

2023-02-23 Thread Val Huber
yer > wrote: > > those are typing issues being reported by Pylance and do not affect the > runtime behavior of the application. > > Pylance refers to typing stubs for SQLAlchemy 1.4 which don't apply to > SQLAlchemy 1.3. > > > > On Thu, Feb 23, 2023, a

[sqlalchemy] Re: Column vs InstrumentedAttribute

2023-02-23 Thread Val Huber
tomer' _s_collection_name = 'Customer' __bind_key__ = 'None' Id = Column(String(8000), primary_key=True) CompanyName = Column(String(8000)) Balance = Column(DECIMAL) On Thursday, February 23, 2023 at 4:36:11 PM UTC-8 Val Huber wrote: > Hello, All > > In SQLAlchemy 1.4.29,

[sqlalchemy] Announcement: API Logic Server 8

2023-02-23 Thread Val Huber
Hello, All If you are using SQLAlchemy and Flask, you might want to take a look at API Logic Server (open source). It reads your schema, and creates an executable project you can customize in your IDE. The project includes the SQLAlchemy* model classes*, an *API*, and a multi-page *Admin Ap

[sqlalchemy] Adding OR () with do_orm_execute

2023-01-11 Thread Val Huber
I am using this and it is working well to AND a series of filters to a statement. But I do not see how to OR these into the original statement. For example, I have filters f1 and f2. I want the result to be: where AND (f1 OR f2). Thanks in advance, Val -- SQLAlchemy - The Python SQL Toolk

Re: [sqlalchemy] Determine transaction after_flush state

2023-01-11 Thread Val Huber
I guess you could look at > session._flushing, is that what you are looking for ? > > On Wed, Jan 11, 2023, at 7:44 PM, Val Huber wrote: >> In API Logic Server, clients can make RESTful requests that cause SQLAlchemy >> reads. These are subjected to authorization security using do_

[sqlalchemy] Determine transaction after_flush state

2023-01-11 Thread Val Huber
In API Logic Server, clients can make RESTful requests that cause SQLAlchemy reads. These are subjected to authorization security using do_orm_execute (which is amazing, by the way). These add filters to ensure proper access. This is all fine. But, when the client makes changes, these activa

[sqlalchemy] Re: Auto Generate sqlachemy models from yml file or dicts

2022-07-03 Thread Val Huber
Hi, David... ApiLogicServer bundles a version of sqlacodegen, and creates the models.py file (along with a running project). Don't know if this fits your needs, hope it helps. On Sunday, July 3, 2022 at 6:15:03 AM UTC-7 david...@gmail.com wro

[sqlalchemy] Re: Just starting with sqlacodegen: wrong command?

2022-06-14 Thread Val Huber
Not sure how this may match your needs, but API Logic Server includes a version of sqlacodegen to create an executable Flask project, including a web app, API, and rules-based logic. It includes a Command Line Utility that provides SQLAlchemy URI examples: (venv) val@Vals-MacBook-Pro-16 ApiLog

[sqlalchemy] Re: Many-to-many cascade delete

2021-11-02 Thread Val Huber
Interesting problem... it's not exactly a cascade delete, which goes from parent (1 side) to children (many side). I think you have to provide code to do this - brute force check the parent to see if it's an "empty nester". This can be expensive if you are cascading a person delete to many per

[sqlalchemy] Announcement: API Logic Server Docker Support

2021-09-26 Thread Val Huber
You may be interested in ApiLogicServer , open source on Git (79k downloads to date). With 1 command, it creates a customizable project providing a JSON:API, and a Basic Web App. These are based on SQLAlchemy, so it uses sqlacodegen to create

[sqlalchemy] Announcing API Logic Server

2021-07-19 Thread Val Huber
You may be interested in ApiLogicServer , open source on Git. With 1 command, it creates a customizable project providing a JSON:API, and a Basic Web App. These are based on SQLAlchemy, so it uses sqlacodegen to create your model classes. S

[sqlalchemy] Extensible Generation

2021-03-10 Thread Val Huber
I work on ApiLogicServer , which creates a *models.py* file (then used to create an API and web app). My objective is to enable users to 1. *Customize* *models.py* (e.g, add hybrid attributes, missing relationships, etc), and 2. *Pres

[sqlalchemy] Logic Bank 0.6.0 - Rules for Muti-table derivations, constraints, extensible with Python

2020-12-27 Thread Val Huber
Logic Bank 0.6 released with support for Extensible Rules, Auditing, Referential Integrity. Over 3500 downloads. -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example cod

[sqlalchemy] Re: Recreating Access in LibreOffice Base

2020-10-22 Thread Val Huber
Hi, Tom Not knowing precisely what you looking for, but you might want to check out fab-quickstart and logic base. Here is an article that will introduce these open source projects. On Thursday, October 22, 2020 at 4:12: