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
На этой странице сайта вы можете посмотреть видео онлайн FastAPI Python framework - SQLAlchemy and Database integration длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь BugBytes 20 Февраль 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 33,151 раз и оно понравилось 588 зрителям. Приятного просмотра!