flask-mysql
flask-mysql copied to clipboard
Where can I get a proper documentation or at least see the code
Is there any documentation that lists all the methods with an explanation? Is there at least MySQL class code with some comments? I cant find anything :(. Only found this: https://flask-mysql.readthedocs.io/en/stable/ which only helps for the start.
Best regrads
I think I found what I was looking for: https://github.com/PyMySQL/PyMySQL#documentation
But I am quite confused. Why should I use the mysql through flask-mysql?
I also stumbled across mysql connector . Whats the difference between pymysql and mysql connector?
@Pixelherz23 there are multiple ways to create a connection between python and mysql server , you can get the list of modules here the advantage of using flask is that we can handle the POST requests as well. but there are two repositories on github
- cyberdelia/flask-mysql
- alexferl/flask-mysqldb
which are totally useless, when you find out flask has nothing to do with mysql.
get official python - mysql documention : https://dev.mysql.com/doc/connector-python/en/connector-python-example-connecting.html
@abhaypatil679 that's not quite true, flask-mysql extension takes care of making sure you only have one connection per request, so even if you call get_db() N times you only actually create 1 connection.