FastAPI Python framework - SQLAlchemy and Database integration

Veröffentlicht am: 20 Februar 2022
auf dem Kanal: BugBytes
33,151
588

This video explains the steps involved in adding a SQLite database to your FastAPI application, and walks through the process of adding SQLAlchemy models and a FastAPI Dependency to allow your FastAPI routes to interact with the database.

A FastAPI startup event is also demonstrated, in order to load dummy data into the database.

Finally, we show how to paginate data with SQLAlchemy, and integrate this with our HTMX-based frontend.

▶️ Full Playlist:
   • FastAPI  

📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
02:28 Database setup with SQLAlchemy
04:18 Creating SQLAlchemy model
06:06 Creating the database tables
08:44 Creating FastAPI database dependency
11:00 Querying database with SQLAlchemy
11:55 FastAPI startup events
15:24 Paginating SQLAlchemy records

☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
https://ko-fi.com/bugbytes

𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📖 Blog: https://www.bugbytes.io/posts/
👾 Github: https://github.com/bugbytes-io/fastap...
🐦 Twitter:   / bugbytesio  

📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
HTMX CDN: https://htmx.org/docs/#installing
FastAPI docs: https://fastapi.tiangolo.com/
FastAPI & relational databases: https://fastapi.tiangolo.com/tutorial...
FastAPI events: https://fastapi.tiangolo.com/advanced...
FastAPI headers: https://fastapi.tiangolo.com/tutorial...
FastAPI templates: https://fastapi.tiangolo.com/advanced...

#fastapi #python #sqlalchemy


Auf dieser Seite können Sie das Online-Video FastAPI Python framework - SQLAlchemy and Database integration mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer BugBytes 20 Februar 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 33,151 Mal angesehen und es wurde von 588 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!