[Flask] mysql connector

Dave Pawson dave.pawson at gmail.com
Tue Jun 21 09:20:49 EDT 2022


Thanks Chris.
   (Lacking experience with mysql I too would prefer to KISS and just
use mysql commands).

so far following https://www.youtube.com/watch?v=51F_frStZCQ

more googling,

>sudo dnf install python3-devel mysql-devel
>pip install mysqlclient    mysqlclient-2.1.0
>pip install flask-mysqldb   1.0.1

has a working ( I think) 'flask-mysqldb' setup, which I think it
simpler (I've done all the db table setup
using python  and 'mysql-connector'.

See if others chip in.

regards

On Tue, 21 Jun 2022 at 14:14, Christopher M Braiotta <braiotta at mit.edu> wrote:
>
> I’ve been using SQLAlchemy for Flask with success for over five years. It has its quirks and there are definitely times I’d prefer to be dealing with straight SQL (which you can do In SQLAlchemy), and there have been moments where I’ve rued how picky it can be about session management.
>
>
>
> Nonetheless, the ability to treat MySQL tables/query results as normal python objects and abstract out the database implementation specifics is a win.
>
>
>
> --
>
> Chris Braiotta
>
> Applications Architect
>
> MIT IS&T
>
> braiotta at mit.edu
>
>
>
>
>
> From: Flask <flask-bounces+braiotta=mit.edu at python.org> on behalf of Dave Pawson <dave.pawson at gmail.com>
> Date: Tuesday, June 21, 2022 at 9:08 AM
> To: flask at python.org <flask at python.org>
> Subject: [Flask] mysql connector
>
> Lots of options it would seem.
> from flask_mysqldb import MySQL
>  -- refuses to install.
>
> The conflict is caused by:
>     flask-mysqldb 1.0.1 depends on mysqlclient>=1.3.7
>     flask-mysqldb 1.0.0 depends on mysqlclient>=1.3.7
>     flask-mysqldb 0.2.0 depends on mysqlclient
>     flask-mysqldb 0.1.1 depends on mysqlclient
>
>
> https://github.com/PyMySQL/mysqlclient#install  another
>
> Another I saw...  SQLAlchemy
>
> Any advice please? I'm looking to stay mainstream,
> to retain a long lived OS system.
>
> Using mariadb database.
>
> Thanks for any advice experience.
>
> regards
>
> --
> Dave Pawson
> XSLT XSL-FO FAQ.
> Docbook FAQ.
> _______________________________________________
> Flask mailing list
> Flask at python.org
> https://mail.python.org/mailman/listinfo/flask



-- 
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.


More information about the Flask mailing list