Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where can I get a proper documentation or at least see the code #52

Open
Pixelherz23 opened this issue Nov 18, 2021 · 3 comments
Open

Comments

@Pixelherz23
Copy link

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

@Pixelherz23
Copy link
Author

Pixelherz23 commented Nov 18, 2021

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?

@patilabhay679
Copy link

@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

  1. cyberdelia/flask-mysql
  2. 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

@drum445
Copy link

drum445 commented Feb 20, 2022

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants