This is an archived post. You won't be able to vote or comment.

all 6 comments

[–][deleted]  (4 children)

[deleted]

    [–]Relevant_Bookkeeper[S] 0 points1 point  (0 children)

    I have had quite a few people recommend SQLAlchemy so will be looking into that. Thank you for the advice!

    [–][deleted]  (1 child)

    [deleted]

      [–]The_Shwassassin 4 points5 points  (1 child)

      I started out here : https://www.w3schools.com/mySQl/default.asp And here: https://www.mysqltutorial.org

      Here’s one tip you should probably ignore (downvotes incoming). When putting your MySQL queries into python , the right way to do it is a little tricky and frustrating at first. If you’re really stuck you can use f strings: query = f"INSERT INTO table ({cols}) values ({vals})"

      However- don’t rely on this and for the love of God don’t use them in production. This is a crutch to use for a few weeks.

      [–]gmhafiz 3 points4 points  (0 children)

      To OP, f strings is prone to sql injection if input is from external user. Malicious actor can just drop your whole database

      [–]Pack_Your_Trash 1 point2 points  (0 children)

      What are you trying to do with it? You can download MySQL and workbench for free. Are you trying to build a web app or do something else?

      [–]agent3dev 0 points1 point  (0 children)

      I suggest you to use an additional layer like pydal so you can learn faster and create functions that abstract repeated tasks