[Python] SqlAlchemy: Any way to rewrite models metadata?

Discussão em 'Python' iniciado por Stack, Setembro 3, 2025.

  1. Stack

    Stack Membro Participativo

    I have some baseline code that uses several SqlAlchemy Models from a path j_gen/models/

    I want to use that baseline, and almost everything is useful except a file, a sqlalchemy model. I couldn't just do an monkey patch like

    j_gen.models.Model = <client>.models.Model

    can i use the base class metadata from SqlAlchemy to replace that interest model? or any other way i could solve this?

    A way to face sqlalchemy overriding

    Continue reading...

Compartilhe esta Página