use sqlautocode:
It is a flexible tool to autogenerate a model from an existing database.
This is a slightly different approach to SqlSoup, which lets you use tables without explicitly defining them. On the other hand, sqlalutocode will generate actual python code.