Тёмный

Python REST API Tutorial for Beginners | How to Build a Flask REST API 

Dave Gray
Подписаться 323 тыс.
Просмотров 7 тыс.
50% 1

Web Dev Roadmap for Beginners (Free!): bit.ly/DaveGrayWebDevRoadmap
In this Python REST API Tutorial for Beginners you will learn how to build a Flask REST API. A key skill for backend web development is learning how to build a REST API. I'll use Python with Flask to show you how.
💖 Support me on Patreon ➜ / davegray
⭐ Become a full-stack dev with Zero To Mastery Courses:
- The Complete Python Developer: bit.ly/CompPythonDev
- Complete Machine Learning & Data Science: bit.ly/CompMachineLearning
- Junior to Senior Dev Roadmap: bit.ly/WebDevRoadmap-JrtoSr
🚩 Subscribe ➜ bit.ly/3nGHmNn
📬 Course Updates ➜ courses.davegray.codes/
🚀 Discord ➜ / discord
☕ Buy Me A Coffee ➜ www.buymeacoffee.com/davegray
👇 Follow Me On Social Media:
GitHub: github.com/gitdagray
Twitter: / yesdavidgray
LinkedIn: / davidagray
🔗 Source Code: github.com/gitdagray/python-f...
Python REST API Tutorial for Beginners | How to Build a Flask REST API:
(00:00) Intro
(00:12) Welcome
(00:38) Tutorial Prerequisites
(00:53) What is REST? What is an API?
(03:07) REST API Diagram
(04:27) Virtual Environment set up
(07:19) Install Dependencies
(09:56) A Simple REST API
(12:38) Modeling Data & Creating the Database
(17:19) Flask Restful
(18:26) Define args with RequestParser
(19:51) /api/users Resource Endpoint
(21:54) Marshalling / Serializable JSON Data
(24:00) POST Data
(30:17) /api/users/id Resource Endpoint
(33:22) Update & Delete Data
📺 Video References:
🔗 Python Full Course for Beginners: • Python Full Course for...
📚 Tutorial References:
🔗 MDN REST: developer.mozilla.org/en-US/d...
🔗 MDN API: developer.mozilla.org/en-US/d...
🔗 Visual Studio Code: code.visualstudio.com/
🔗 Python: www.python.org/
🔗 git & git bash: www.git-scm.com/downloads
🔗 Flask: flask.palletsprojects.com/en/...
🔗 Flask Restful: flask-restful.readthedocs.io/...
🔗 Flask SQLAlchemy: flask-sqlalchemy.palletsproje...
Was this Python REST API tutorial for beginners helpful? If so, please share. Let me know your thoughts in the comments.
#python #rest #api

Опубликовано:

 

21 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 77   
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
Leave a comment to let me know what Python topics you want to see in the future 🙌 Thanks!
@codernerd7076
@codernerd7076 Месяц назад
FastAPI with Next.js maybe?!
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
@@codernerd7076 nice suggestion!
@user-ui5jx2zl6u
@user-ui5jx2zl6u Месяц назад
Https server with python and ssl
@apokalupsis116
@apokalupsis116 Месяц назад
Something similar for SOAP
@umernasir4217
@umernasir4217 Месяц назад
Fast API and Drizzle ORM
@xzex2609
@xzex2609 Месяц назад
🤣🤣 that was the funniest most accurate description of the rest api : they are sitting at rest doing nothing except calling them and serving some data from db.
@xyzxyz6095
@xyzxyz6095 Месяц назад
Dave the Great Teacher. Thank you for your generosity with these videos on Python. Be Blessed. Salutations from France.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
You're very welcome!
@psykoj
@psykoj 8 дней назад
Great tutorial!
@molleker
@molleker Месяц назад
Hi Dave, I find your teaching style great. Thanks you very much for the amazing content! I'd definitely love to see more video about web development in Python in general and using Flask in particular.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
Thanks, will do!
@phevab
@phevab Месяц назад
Learnt a lot. Much appreciated @Dave Gray Django and react authentication
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
Glad to hear that!
@snehasingh1929
@snehasingh1929 17 дней назад
yes please we need the next part awesome tutorial btw
@dev-akeel
@dev-akeel Месяц назад
Once upon a time Flask used to be called as a micro and minimalistic framework. But today I can see that it has a lot inside it.
@muazuidrisy.4732
@muazuidrisy.4732 Месяц назад
Thanks for the video, Mr. Dave. We appreciate it. It would be great if you could make a video covering the complete backend with REST API. It should include user authentication and authorization, email verification, password reset, OTP, welcome message, and user upgrade to, let's say, a super user, etc.
@xzex2609
@xzex2609 Месяц назад
every topic in related to backend is good(python). I recently worked with some express js api and it was amazingly simple and direct.
@chrisw5509
@chrisw5509 Месяц назад
I'm subscribed. Great video, easy to follow, great explanations. I like when you also show some "tips" for using VSC.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
Glad to hear that!
@codebykeoma
@codebykeoma 4 дня назад
Thank you for this! It was helpful. I would like to see a tutorial using a registration form with better data validation.
@danielouattara3857
@danielouattara3857 24 дня назад
Hello Dave, Thank you for your work ! You provide us with very interesting and valuable content, not only in Python, but also in Next, React, ...etc. So in this way, if you miss some inspiration, you could adapt most of the projects you shared with in Next , React, PHP,...etc... to Python using Django or Flask as frameworks. Moreover, showing the parallel development of each code (like from Next to Python) could help understand the requirements and the logic migration for a given project. For example a Next.js completed project's code could be the starting point, then, you built again the project in Python and explain the logic migration from one to another. anyway , thank you again
@DaveGrayTeachesCode
@DaveGrayTeachesCode 24 дня назад
Great suggestion! 🙌
@nakayuni
@nakayuni Месяц назад
Thanks for the hard work put into this🙏 just waiting for one in Django
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
More to come!
@rajendrakole5449
@rajendrakole5449 28 дней назад
Great Series Dave Sir! Love from India ♥️🇮🇳
@hassanmirza2392
@hassanmirza2392 Месяц назад
Thanks Dave. More data engineering with python courses will be good.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
You're welcome!
@crushfire2004
@crushfire2004 26 дней назад
Continue seems interesting, currently I testing cody, cursor & supermaven
@DaveGrayTeachesCode
@DaveGrayTeachesCode 26 дней назад
Yes, I'm interested in comparing free options
@_byproxy
@_byproxy Месяц назад
Hi! this video came at the perfect time for me and is super useful! If you had any guidance on how would be a good way to format an incoming search query for this type of REST API, I would be eternally grateful.
@KhanhHoang-fi6yh
@KhanhHoang-fi6yh Месяц назад
Please compare flask and fastapi, if i want to work with llms and langchain or llamaindex which one is better in your opinion. Thank you Dave for greate videos
@user-qt6ve7ci2z
@user-qt6ve7ci2z Месяц назад
thanks for making free tutorial videos
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
You are welcome!
@user-du2qu5uo9u
@user-du2qu5uo9u 27 дней назад
Hi Dave, this content is helpful if you make a video on flask framework full-course quite helpful for everyone can learn and grow 😊
@user-fm5nx3fq3n
@user-fm5nx3fq3n Месяц назад
python topic I want to suggest * flask with streamlit, mesop also please take your time to create a complete project (never before seen on your channel) using flask and any frontend preferably React.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
Great requests!
@MrRys
@MrRys Месяц назад
great tutorial, one thing I have noticed, the abort method's error message needs to be a dict not just a string
@DaveGrayTeachesCode
@DaveGrayTeachesCode 29 дней назад
Yes, I forgot to add message= before the string. Updated the linked repo.
@Huzaifa-p6e
@Huzaifa-p6e 5 дней назад
Hey Dave can we dockerize the REST flask api which inferences a ml model? , if so any tutorials?
@rexsybimatrimawahyu3292
@rexsybimatrimawahyu3292 Месяц назад
Awesome video and explanation, is it possible to make a continuation where how we can use the rest api with other non python framework?
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
Thank you, and yes, great request!
@jordymaryns4945
@jordymaryns4945 Месяц назад
Nice video. Would it be possible to make a video that takes this concept and consumes it via NextJs? As a way to combine the best of both languages. (ideally Django, but I would assume that both will be similar)
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
Great suggestion!
@chrisw5509
@chrisw5509 Месяц назад
Yes, I would like to see more on Data Validation. Also, if you can do a video on FastAPI, I would appreciate that. I've created several FastAPI Web Apps for my personal use. I use MariaDB as my DB Server instead of SQLite. I also prefer to write raw SQL for my queries instead of SQLALchemy. However, I'm a novice and want I would like to improve my Apps.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
Great requests! Thank you!
@anjaneyulub2529
@anjaneyulub2529 Месяц назад
Nice content dave❤ pls make video on python with FastAPI
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
Great request! I want to do this!
@ericofernandes2204
@ericofernandes2204 Месяц назад
Nice content. Greetings from Brazil. Waiting for a Docker tutorial
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
Glad you like it! Docker on its own or Docker with Python? Here's one I published earlier this year with Docker, PHP, Apache & Postgres: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-NL23_cVq6XI.html
@ericofernandes2204
@ericofernandes2204 Месяц назад
@@DaveGrayTeachesCode with python
@jayyay693
@jayyay693 8 дней назад
Why is the virtual env needed I thought it’s not necessary please or anyone explain why it’s needed thanks
@user-ny6ri9zt5l
@user-ny6ri9zt5l Месяц назад
Please Do FASTAPI series
@abzmantawil
@abzmantawil Месяц назад
waiting for DJANGO API
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
I plan to do this topic for sure!
@joaoarthurbandeira
@joaoarthurbandeira 27 дней назад
@@DaveGrayTeachesCodealso it would be great to show us how to integrate django rest with nextjs! 🙌🏻
@VenkatesanVenkat-fd4hg
@VenkatesanVenkat-fd4hg Месяц назад
Requires to discuss JWT and other backend related series on python
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
Agreed - additional backend topics will be a great addition 🙌
@mypc-pe4hy
@mypc-pe4hy Месяц назад
why are you not giving us Django rest api tutorial?
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
Better to start out learning about them with a simple Python flask REST API. I have said I will cover a Django REST API in the future. One might ask why you are in a rush?
@Mona.Guerin
@Mona.Guerin 22 дня назад
building full websites with Flask
@narayanadhikari8157
@narayanadhikari8157 Месяц назад
Yes Yes Yes.
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
🙌 Glad you like it!
@ajiteshmishra0005
@ajiteshmishra0005 Месяц назад
Create same video for ReactJS and NodeJS So, that Frontend Developers can benefitted
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
My Node.js course creates a full backend REST API here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-f2EqECiTBL8.html ...And I have a React playlist that creates a frontend to go with it here: ru-vid.com/group/PL0Zuz27SZ-6PRCpm9clX0WiBEMB70FWwd
@ajiteshmishra0005
@ajiteshmishra0005 Месяц назад
​@@DaveGrayTeachesCode A great Thank you Sir. We are learning more with your explanation. Keep uploading such videos. We wait for your explanation on every topics.
@SFerDev
@SFerDev 11 дней назад
Full stack flask app
@nrayx11
@nrayx11 Месяц назад
All hail to King Viserys Targaryen👍
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
Ha! Now where did I park my dragon?
@babar-khan
@babar-khan Месяц назад
why many people are runnign towardds to python now ?
@DaveGrayTeachesCode
@DaveGrayTeachesCode Месяц назад
I have not seen this happen. I have always used both JavaScript and Python.
@Shriram279-1
@Shriram279-1 20 дней назад
seems to be very complicated for a beginner who is good at basics of python. Got headache by going through it. I wonder ppl commented here they got to know the content very well. U ppl serious?
@zlackbiro
@zlackbiro Месяц назад
Flask is the worst web framework created in history of Web development. Dude, That crap is so slow that can't even finish the simple benchmark.
@mypc-pe4hy
@mypc-pe4hy Месяц назад
waiting for DJANGO API
Далее
Build an AI RAG Application with LangChain & Next.js
33:34
5 Good Python Habits
17:35
Просмотров 441 тыс.
`const` was a mistake
31:50
Просмотров 130 тыс.
Modern Python logging
21:32
Просмотров 163 тыс.
FastAPI, Flask or Django - Which Should You Use?
9:49
Why You NEED To Learn FastAPI | Hands On Project
21:15
Просмотров 154 тыс.
How to NOT Fail a Technical Interview
8:26
Просмотров 1,3 млн
5 Useful F-String Tricks In Python
10:02
Просмотров 280 тыс.
I learned to code from scratch in 1 year. Here's how.
41:55