I am learning Python / Flask. Now I am at the point where I am learning Flask with MySQL Database. I read lots of posts about using Flask with databases and most of them suggest to use SQLAlchemy. I tried to read about SQLAlchemy, but I didn't like that because I prefer building and executing SQL queries and creating tables in the database only. Is there any way that I can take full benefit of using Flask with MySQL Database without SQLAlchemy?
Please suggest.
You don't have to use SQLAlchemy, no. You just have to connect to the database in Flask and execute your queries manually.
This question is about how to connect to MySQL with Python, and the official docs go over creating a site with a SQLite database. Modify the examples provided there with your MySQL connection.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With