Getting Started With Flask-SQLAlchemy

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • In this video I will teach you the basics of Flask-SQLAlchemy. We will create a database, add some data to it, and query the database for data we inserted.
    Need one-on-one help with your project? I can help through my coaching program. Learn more here: prettyprinted....
    Flask-SQLAlchemy Basics Course: prettyprinted....
    Flask-SQLAlchemy Documentation: flask-sqlalche...
    Get the code here: prettyprinted.c...
    Twitter: / pretty_printed
    Github: github.com/pre...

Комментарии • 81

  • @prettyprinted
    @prettyprinted  4 года назад +8

    Join my free course on the basics of Flask-SQLAlchemy: prettyprinted.com/flasksql

    • @slhermit
      @slhermit 4 года назад +1

      Great teaching

  • @riverscuomo
    @riverscuomo 5 лет назад

    How To Download & Install SQLite Tools www.sqlitetutorial.net/download-install-sqlite/
    Adding sqlite to PATH on Windows: stackoverflow.com/questions/9546324/adding-directory-to-path-environment-variable-in-windows

  • @iaashu98
    @iaashu98 4 года назад +2

    Thank you so much. You just saved me. Thank you many times. Love from India. Guruji 🙏

  • @caba3760
    @caba3760 4 года назад +2

    Nice! Thanks for the video.
    I also like it when there is a macro explanation, lets say using boxes and arrows, so that one understands the relation between flask, python, database, etc.

  • @anneest
    @anneest 5 лет назад +6

    Thank you Anthony for another great introduction video!

  • @zael7848
    @zael7848 4 года назад +2

    The book i just bought isn't good explaining this part, but your video make it simple and interesting, thanks for the help.

    • @xz7525
      @xz7525 4 года назад +1

      The Grinberg book? I'm in the same boat...

    • @zael7848
      @zael7848 4 года назад

      @@xz7525 yes, the same book my random friend.

  • @JohnnyGrateful
    @JohnnyGrateful 3 года назад +1

    Amazing content. Straight to the point and super clear. Thank you!

  • @leandrolopesleal26
    @leandrolopesleal26 4 года назад

    Thank tou from Brazil!!!

  • @tymothylim6550
    @tymothylim6550 3 года назад

    Thank you very much for this video! This video was really clear and helpful :)

  • @DanielMCorrea1
    @DanielMCorrea1 3 года назад

    Thanks a lot, your content was very helpful.

  • @aditya_shekhar
    @aditya_shekhar 4 года назад +1

    What are the extensions used in VSCode?

  • @rakkaalhazimi3672
    @rakkaalhazimi3672 4 года назад

    Good tutorial, I will consider watching ur course later

  • @l.l.l.management2149
    @l.l.l.management2149 4 года назад +1

    Thank you for your tutorial video!
    from Japan.

  • @asmaarshad7695
    @asmaarshad7695 3 года назад

    AOA
    sir mera 1 error a raha h yah wala ModuleNotFoundError: No module named 'flask_sqlalchemy' m n exactly asy hi kiya h jasa ap n vikdeo m kerwaya h . mera error kasy resolve ho g kindly plz bata dy

  • @avisekssarma5592
    @avisekssarma5592 3 года назад

    Thank you as always.

  • @Zero2222-z4u
    @Zero2222-z4u Год назад +2

    If somebody is having "RuntimeError: Working outside of application context." when trying to create the database
    I repaired it by doing:
    from app import app, db
    app.app_context().push()
    db.create_all()

  • @prakashsrinivasan3734
    @prakashsrinivasan3734 3 года назад

    sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) datatype mismatch
    [SQL: INSERT INTO user (name, email) VALUES (?, ?)]
    [parameters: ('abc', 'jsadhfh')]
    Can I know why am I getting this error ? I have tried googling on this and was unable to find the reason behind it.
    Thanks in advance .

  • @Stenominator
    @Stenominator 4 года назад

    Thanks man. Great videos. Just... this video is no. 25 on your playlist, and it is about getting started... :D

  • @hamzaahmed1261
    @hamzaahmed1261 3 года назад

    when importing db i get the error from: can't read /var/mail/app can you guide me

  • @heral15
    @heral15 4 года назад

    Hi, i am developping a project. In my project it says that User has no attribute "query" when i do User.query.all(). Do you know why ? i don't know if the problem is some import

  • @meomeoaja1822
    @meomeoaja1822 5 лет назад +1

    謝謝分享, 非常棒的影片.
    thank you for sharing the awesome video.
    ---student from Taiwan

  • @ramyattalla7168
    @ramyattalla7168 4 года назад

    I can't create the database for some reason. When i write from app import db i get:
    from: can't read /var/mail/app
    What does that mean?

  • @OrientalMelodies2010
    @OrientalMelodies2010 4 года назад +1

    Awesome as usual!! Thanks a lot!

  • @walidanon2372
    @walidanon2372 4 года назад +1

    thats great job!! thank you...

  • @mahiansari1863
    @mahiansari1863 4 года назад

    Thank you very much...it was very helpfull

  • @JoeWong81
    @JoeWong81 5 лет назад +1

    Thanks for the tutorial bro

  • @miosz952
    @miosz952 4 года назад +4

    Hey! Great introduction tutorial, I'll definetly check full course. I have one question, what I should install to use sqlite3 commend in terminal?

    • @ismet1111
      @ismet1111 4 года назад

      Don't have to install sqllite3. It is a built in package for python

  • @henryboey6918
    @henryboey6918 4 года назад

    PLEASE HELP I HAVE UNRESOLVE ATTRIBUTE REFERENCE 'COLUMN' . I DID ALL THE CONFIGURATIONS BUT STILL THE SAME

  • @hbrahmbhatt3369
    @hbrahmbhatt3369 4 года назад

    Hii sir my db which is myphpadmin is not getting from MySQL uri so what I can do

  • @sashastage5567
    @sashastage5567 4 года назад

    thank you!!

  • @naheliegend5222
    @naheliegend5222 3 года назад

    Hey, I have a question: How do you learn the fancy terminal stuff? I stillt don't know what happens when I am putting "python" in the terminal :D

  • @Raldenaldrin
    @Raldenaldrin 2 года назад

    How can you print the word "California"? You didn't typed the word California

  • @theenthucoder1096
    @theenthucoder1096 4 года назад +1

    Hi Anthony, Could you make a video on how to deploy the flask-sqlalchemy code with multiple requests into Azure?

  • @elenaperez6327
    @elenaperez6327 3 года назад

    Great tutorial thanks! Can you tell me how I would go about inserting an image into the database please?

  • @sanjjushrivarshiniraids1610
    @sanjjushrivarshiniraids1610 3 года назад

    i am not able to create db file
    with this procedure

  • @vvkkumar3691
    @vvkkumar3691 4 года назад

    Can we issue multiple query with single session object ?

  • @NimitKhuranaa
    @NimitKhuranaa 5 лет назад +1

    is there a video explaining the working of a python project tree, especially flask?

  • @hannibalbra2808
    @hannibalbra2808 2 года назад

    Hello can i connect to exist database

  • @annujolly3024
    @annujolly3024 4 года назад

    Great video

  • @bonaoenchelcha
    @bonaoenchelcha 4 года назад +2

    thanks for subtitles XD

  • @rangabharath4253
    @rangabharath4253 5 лет назад

    Awesome as always 👍😀

  • @buuqmarabo2778
    @buuqmarabo2778 5 лет назад

    thanks for your help.

  • @brianfiszman3179
    @brianfiszman3179 5 лет назад

    Why do everyone in these tutorials show the models stuffed in the app.py? I'm looking everywhere how to do it in separate files like a normal MVC project. Am I missing something?

    • @prettyprinted
      @prettyprinted  5 лет назад

      It's not always worth it to set up a complete file structure for a simple exist. Check out my recent full app videos like the Q&A app in Flask. It might have the folder structure you want, and I include a code link in the video as well.

  • @imlautaro123
    @imlautaro123 4 года назад

    Great video

  • @nostergenesis3081
    @nostergenesis3081 4 года назад

    Your videos are not in order, can u please give their order details.....Getting Started with Flask SqlAlchemy is the 19th video...It should be the first.....PS : THANKS IN ADVANCE

  • @michaelsindile654
    @michaelsindile654 2 года назад

    Do you perhaps have a course that covers flask admin

  • @petefritz5679
    @petefritz5679 5 лет назад

    Regarding the date created value, will it change if I update a row? For example suppose Zack moves from Sydney to Perth and the table gets updated will the date created value automatically change?

    • @prettyprinted
      @prettyprinted  5 лет назад +2

      No, the date created value won't update automatically unless you write code to do that. If you should be able to use 'onupdate' inside of your column definition to set the date each time the model updates.

    • @petefritz5679
      @petefritz5679 5 лет назад

      @@prettyprinted Thanks

  • @albredka2720
    @albredka2720 4 года назад

    great!

  • @michal.nalevanko
    @michal.nalevanko 5 лет назад

    Thanks for the video! One question, though. Why didn't you use the string keyword when defining the routes, like app.route(/)?

    • @prettyprinted
      @prettyprinted  5 лет назад +2

      String is the default option, so nothing changes if you omit it. Although it can be a good idea in real apps to make things more explicit.

  • @elizabethmathew3400
    @elizabethmathew3400 4 года назад

    I am getting no module named app error..why?

    • @adeki340
      @adeki340 4 года назад +2

      Replace 'app' with the name of your .py file. My python file was named main.py so i had to type 'from main import db'

  • @kumarmrinal1992
    @kumarmrinal1992 4 года назад

    How to use Flask_SqlAlchemy in blueprints

  • @RizwanAli-ki3bx
    @RizwanAli-ki3bx 4 года назад

    if I delete some record from the database they are still showing in API call even records not exists in the database, but if I refresh or restart the server then it shows no record, Can you please help me?

  • @med6402
    @med6402 4 года назад

    can you please give me a hint on how to update data automatically shown in a webpage from a database without refreshing the hole page

    • @lucasino20
      @lucasino20 4 года назад

      if __name__ == '__main__' :
      app.run(debug = True)

  • @kanishk9490
    @kanishk9490 2 года назад

    Why didn't I find your channel earlier

  • @ronaldronald8819
    @ronaldronald8819 4 года назад

    Hi. Great tutorial. Thanks!
    Had some issue with linting members SQLAlchemy not recognised erros with db.Column, etc stackoverflow.com/questions/53975234/instance-of-sqlalchemy-has-no-column-member What linter are you using?

    • @jacobward7361
      @jacobward7361 4 года назад

      this fixed it for me stackoverflow.com/a/61155831/7274182

    • @ChupoCro
      @ChupoCro 3 года назад

      Doesn't work with Python 2.7 because *pylint-flask-sqlalchemy* works only with Python 3.x

  • @one_lettersandnumbers
    @one_lettersandnumbers 5 лет назад

    How do you add an index to a column of a table with Flask-SQLAlchemy?

    • @prettyprinted
      @prettyprinted  5 лет назад +1

      You can just add the index=True parameter to the column when you create it.

  • @fletcherlarue3440
    @fletcherlarue3440 4 года назад

    Maybe it's obvious, by does just sqlalchemy not work with flask? Why use flask-sqlalchemy?

  • @dennisasamoah2213
    @dennisasamoah2213 4 года назад

    great

  • @aqeeljabbar7404
    @aqeeljabbar7404 4 года назад

    nice

  • @zolongOne
    @zolongOne 5 лет назад +3

    Flask is easier to learn than django

    • @xn4pl
      @xn4pl 5 лет назад

      I think that even though Flask is easier to learn, Djando lets you do more complex stuff much more easier than in Flask, if you put your time to learn it.