Python FastAPI Tutorial: How to Connect FastAPI to Database

preview_player
Показать описание
In this Python video tutorial, you will dive into how to connect a SQLite database to FastAPI, a web framework for developing modern RESTful APIs using Python. Let's set up your FastAPI application to now work with a database so you can save items.

🎓 Check these out 🎓
===========================================

🎓 Courses can be found:

💻 GitHub Repo 💻
* Follow README to get started *

⭐ Timestamps ⭐
===========================================
00:00 - Intro
00:25 - Recap
02:37 - Install SQLAlchemy
03:10 - Update database settings file
06:34 - Update models and table of database
12:22 - Dependency Injection
14:00 - Create new Book for database
17:53 - Update new Book for database
23:00 - Delete Book from database

⭐️ Hashtags ⭐️
#codingwithroby #FastAPITutorial #PythonDatabase
Рекомендации по теме
Комментарии
Автор

clear and concise!! I love it. Good job sir!

boy-zc
Автор

love it! very clear and easy to understand

tlylfpx
Автор

Very very clear instructions and explanations. Thank you for making this video. :)

debhasish
Автор

most Beautiful and comprehensible video on FASTAPI with database, thanks man +1 follower

spider
Автор

I love the video, super useful. Thanks for sharing.

vinni_codes
Автор

Great work man, it help me a lot! Keep it going \, , /

nicolasaltamirano
Автор

that was what I exactly needed. Thank you so much!

robertocorti
Автор

Got to learn a lot of things through this video!

anujonthemove
Автор

everything i learned yesterday by looking at code in 10mins. i should have checked youtube yesterday...

bertlemoi
Автор

nice work! simple and useful
how about a third video showing how to mock the data in the sql db for testing purposes?

marcodigennarobari
Автор

Any chance you will continue and add a video on how to get web templates to interact with your book db? Thank you!

pleabargain
Автор

Subbed! Create more FastAPI content man, know your audience.

aviraltiwari
Автор

does the book id have to be an int or can i make it a string

whereismypants
Автор

Great video!

Can you make a video for Quart (another async framework for Python) ?

It's the async version of Flask but recently able to use Flask extensions..which makes it potentially as popular as Flask itself.

Liked and subscribed!

pietraderdetective
Автор

Hi, after create a new book, I want to take the ID of that inserted raw, how should I do?

andreww
Автор

If im working with an already existing database will the same concept work?

alielshimy
Автор

I get models is not a module, even though it is in the same directory

aadargupta
Автор

I had a problem with creating a sqlite db.
So, after I created the books.db file it only has id column creating inside, no title, author ... column created.
I tried deleted the .db file also the __pycache__.py, then re-run the program but still did work

dosengthavong
Автор

is there a way of doing this with a context manager?

clearthinking
Автор

the autoincrement doesnt work for me ... any tipps?

robinmaurer