I'm writing a python programm to do granular syncs between different DB.
I'm using SQLAlchemy and a module named sqlautocode for DB inspecting and Schema Classes production.
Having two DB to sync, with same tables name, the Classes written by sqlautocode results with same names.
I have to import theese Classes with arbitrary prefixes, I'm thinking about something like this:
from module_name import * with prefixes
Otherwise I should import every Classes name with an "as" modifier, like this:
from module_name import x as master_x
First of HardCode name extraction procedures with control lists and exec/eval complex code I'd like some suggestions about it.
UPDATE: The solution is a sqlautocode option: --table-prefix=TABLE_PREFIX
thank you all