Re: [sqlalchemy] Redefine class on runtime

2019-03-04 Thread Tolstov Sergey
Thanks for answer, can i get only part of classes mappers? Somethink about Myclass.mapper.clear()? -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See

Re: Error while running “superset db upgrade” after changing metadata DB to vertica

2019-03-04 Thread Mike Bayer
Hi there - I'm not familiar with "Superset", nor does Alembic have built in support for the "Vertica" database.It looks like the Vertica SQLAlchemy drive doesn't have Alembic support implemented which at the very least would be a small stub DefaultImpl subclass.. You would need to consult

Re: [sqlalchemy] Re: Organizing a project

2019-03-04 Thread Rich Shepard
On Mon, 4 Mar 2019, Jonathan Vanasco wrote: We "define" the model in a separate package - all the classes and relationships are in there. There are database support items as well, and some of the advanced/business logic that manipulate the ORM objects. By advanced-database-specific logic, an

Re: [sqlalchemy] Re: Organizing a project

2019-03-04 Thread Jonathan Vanasco
We "define" the model in a separate package - all the classes and relationships are in there. There are database support items as well, and some of the advanced/business logic that manipulate the ORM objects. By advanced-database-specific logic, an example might be: resetting a password is a

Re: [sqlalchemy] Redefine class on runtime

2019-03-04 Thread Mike Bayer
On Mon, Mar 4, 2019 at 12:40 AM Tolstov Sergey wrote: > > Hi, for unit tests i need to create class with Base.metadata.create_all, and > delete table defintion (for tests) > > On second definition i have a error (already defined) > > With use Base.metadata.clear i get warning > > SAWarning:

Re: [sqlalchemy] MySQL Connector

2019-03-04 Thread Mike Bayer
On Sun, Mar 3, 2019 at 8:40 PM Warwick Prince wrote: > > Hi Community > > We’ve been using sqlalchemy with great success for many years. We’ve been > using the mysqlconnector to connect to my MySQL databases with no issues to > speak of. > > My issue is that I recently upgraded to the latest

Re: [sqlalchemy] Re: Organizing a project

2019-03-04 Thread Rich Shepard
On Sun, 3 Mar 2019, Jonathan Vanasco wrote: I generally write the SqlAlchemy models as a separate package, then import that into my MVC/etc patterned app. In terms of the SqlAlchemy logic, some of that I keep in the models package, others are in the core app. ... So my general advice is to