Herramientas de usuario

Herramientas del sitio


wiki2:python:flask:sqlalchemy

Flask SQLAlchemy

For using it with MySQL:

$ apt-get install python-dev libmysqlclient-dev
$ pip install mysql-python

Then the connection string will be:

app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://username:password@localhost/db_name'

It seems that you also can install the pymysql package, then:

'mysql+pymysql://username:password@localhost/db_name'
wiki2/python/flask/sqlalchemy.txt · Última modificación: 2020/05/09 09:25 (editor externo)