I am currently working on a pyramid system that uses sqlalchemy.
This system will include a model (let’s call it Base) that is stored in a
database table. This model should be extensible by the user on runtime. Basically, the user
should be able to subclass the Base and create a new model (let’s call this one ‘Child’).
Childs should be stored in another database table.
All examples available seem to handle database reflection on a predefined model.
What would be the best way to generate complete model classes via database reflection?
I just solved the problem described above by using the following code snippet:
However, I don’t know why the first try didn’t work out…