1

Ok ok the table already exists....

Is there any utility to transform a mysql table into a flask-sqlalchemy db.Model without typing?

1 Answer 1

2

yes, I personally like sqlacodegen, see https://pypi.python.org/pypi/sqlacodegen

to install:

pip install sqlacodegen

to generate ORM code (using MySQL as an example, root user with no password):

sqlacodegen mysql+pymysql://root@localhost/your_database_name
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.