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...
Join my free course on the basics of Flask-SQLAlchemy: prettyprinted.com/flasksql
Great teaching
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
Thank you so much. You just saved me. Thank you many times. Love from India. Guruji 🙏
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.
Thank you Anthony for another great introduction video!
The book i just bought isn't good explaining this part, but your video make it simple and interesting, thanks for the help.
The Grinberg book? I'm in the same boat...
@@xz7525 yes, the same book my random friend.
Amazing content. Straight to the point and super clear. Thank you!
Thank tou from Brazil!!!
Thank you very much for this video! This video was really clear and helpful :)
Thanks a lot, your content was very helpful.
What are the extensions used in VSCode?
Good tutorial, I will consider watching ur course later
Thank you for your tutorial video!
from Japan.
You're welcome!
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
Thank you as always.
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()
Thank you
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 .
Thanks man. Great videos. Just... this video is no. 25 on your playlist, and it is about getting started... :D
when importing db i get the error from: can't read /var/mail/app can you guide me
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
謝謝分享, 非常棒的影片.
thank you for sharing the awesome video.
---student from Taiwan
You're welcome! Thanks for watching.
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?
Awesome as usual!! Thanks a lot!
thats great job!! thank you...
Thank you very much...it was very helpfull
Thanks for the tutorial bro
Hey! Great introduction tutorial, I'll definetly check full course. I have one question, what I should install to use sqlite3 commend in terminal?
Don't have to install sqllite3. It is a built in package for python
PLEASE HELP I HAVE UNRESOLVE ATTRIBUTE REFERENCE 'COLUMN' . I DID ALL THE CONFIGURATIONS BUT STILL THE SAME
Hii sir my db which is myphpadmin is not getting from MySQL uri so what I can do
thank you!!
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
How can you print the word "California"? You didn't typed the word California
Hi Anthony, Could you make a video on how to deploy the flask-sqlalchemy code with multiple requests into Azure?
Great tutorial thanks! Can you tell me how I would go about inserting an image into the database please?
i am not able to create db file
with this procedure
Can we issue multiple query with single session object ?
is there a video explaining the working of a python project tree, especially flask?
Hello can i connect to exist database
Great video
thanks for subtitles XD
Awesome as always 👍😀
Thanks for watching!
thanks for your help.
You're welcome!
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?
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.
Great video
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
Do you perhaps have a course that covers flask admin
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?
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.
@@prettyprinted Thanks
great!
Thanks for the video! One question, though. Why didn't you use the string keyword when defining the routes, like app.route(/)?
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.
I am getting no module named app error..why?
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'
How to use Flask_SqlAlchemy in blueprints
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?
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
if __name__ == '__main__' :
app.run(debug = True)
Why didn't I find your channel earlier
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?
this fixed it for me stackoverflow.com/a/61155831/7274182
Doesn't work with Python 2.7 because *pylint-flask-sqlalchemy* works only with Python 3.x
How do you add an index to a column of a table with Flask-SQLAlchemy?
You can just add the index=True parameter to the column when you create it.
Maybe it's obvious, by does just sqlalchemy not work with flask? Why use flask-sqlalchemy?
great
nice
Flask is easier to learn than django
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.