I was creating an abstract base class containing FK, like this :
but kept getting the error :
sqlalchemy.exc.InvalidRequestError: Columns with foreign keys to other columns must be declared as @declared_attr callables on declarative mixin classes.
Reading thru the docs was not helpful because the example used for @declared_attr is somewhat different
this SO answer helped.
Essentially use it as :