It seems that there was no way to do that at the time of asking the question, but now there is. I had good results with SQLModelGenerator
from the sqlacodegen
package. I have been using is very succesfully for about a year now.
See
https://pypi.org/project/sqlacodegen/
https://github.com/agronholm/sqlacodegen/blob/master/src/sqlacodegen/generators.py#L1373