Unlocking the Power of NoSQL: FastAPI with MongoDB

  Рет қаралды 31,040

Eric Roby

Eric Roby

Жыл бұрын

In this video, we will guide you through the process of creating a Python FastAPI application with MongoDB, a powerful NoSQL database.
🎥 React + FastAPI: • How to build a React +...
🎥 AWS Lambda + FastAPI: • Deploy FastAPI on AWS ...
🎥 MySQL + FastAPI: • How to build a FastAPI...
🎥 PostgreSQL + FastAPI: • How to build a FastAPI...
===========================
🎓 Courses can be found:
FastAPI Beginner & Advanced: www.udemy.com/course/fastapi-...
Learn Chatbot Development: www.udemy.com/course/the-comp...
===========================
🛒 GEAR & RECOMMENDED BOOKS: kit.co/codingwithroby
Python FastAPI has gained tremendous popularity as a high-performance, easy-to-use framework for building web applications and APIs. Combining FastAPI with MongoDB noSQL allows us to leverage the flexibility and scalability of a document-oriented database, making it an excellent choice for modern web development.
Throughout this tutorial, we will cover the essentials of setting up a FastAPI project, integrating MongoDB as our database, and implementing various CRUD (Create, Read, Update, Delete) operations. Whether you're a beginner or an experienced Python developer, this tutorial will provide valuable insights into building robust and efficient web applications.
Here's a sneak peek at what we'll cover in this video:
Introduction to FastAPI: We'll start by introducing FastAPI and highlighting its key features that make it a top choice for web development.
Setting Up the Project: We'll guide you through the process of creating a new FastAPI project and setting up the necessary dependencies. We'll also cover the installation of MongoDB and the required Python libraries for working with it.
Connecting to MongoDB: You'll learn how to establish a connection to a MongoDB database from your FastAPI application. We'll demonstrate how to configure the connection settings.
CRUD Operations: We'll dive into the core functionality of our application by implementing CRUD operations using FastAPI and MongoDB. You'll see how to create, retrieve, update, and delete documents in the database using FastAPI's intuitive syntax.
By the end of this video, you'll have a solid understanding of building a Python FastAPI application with MongoDB as your database. Whether you're looking to develop RESTful APIs, microservices, or full-stack web applications using FastAPI and Python, this tutorial will equip you with the skills you need to get started.
Make sure to like this video, subscribe to our channel, and hit the notification bell to stay updated with our latest tutorials on web development, Python, and more. Let's dive into the exciting world of FastAPI and MongoDB noSQL together!
#fastapi #mongodb #python

Пікірлер: 79
@codingwithroby
@codingwithroby Жыл бұрын
Python 3.12 is out now in pre-release! Like & comment what you want to learn next 🙂
@night23412
@night23412 Жыл бұрын
something to note, do not use async routes when writing blocking synchronous code inside them such as pymongo queries. This will prevent FastAPI from running the sync code in a thread pool since it assumes that the code inside can be awaited in an event loop. For more info check out the "in a hurry?" section of the async page in the FastAPI docs
@codingwithroby
@codingwithroby Жыл бұрын
Awesome additional information!
@carlopignatiello2793
@carlopignatiello2793 Жыл бұрын
Or maybe you can use motor instead of pymongo, it supports async await. Is this correct?
@maihuynhtuanvu2254
@maihuynhtuanvu2254 11 ай бұрын
@@carlopignatiello2793 yes, it's just a wrapper of pymongo
@saidA4492
@saidA4492 11 ай бұрын
Thank you for the detailed explanations. Your enthusiasm and passion for what you do are inspiring and have encouraged me. Wish you the best man!
@codingwithroby
@codingwithroby 11 ай бұрын
This is awesome 🙂 thank you for the nice message!!
@Miho_13
@Miho_13 5 ай бұрын
Thank you so much, you were very clear and the code works well! I was struggling a bit with updating the post, put and delete functions on the browser with VS code.. in the end I just had to "save" files for them to take effect. Whoever is wondering if this video is worth going through, I would say 100% it is - I am an absolute beginner and managed to follow it through.
@efbYouTube
@efbYouTube Жыл бұрын
excellent vid! Look fwd to seeing more!!
@codingwithroby
@codingwithroby Жыл бұрын
Glad you enjoyed it! ❤️
@federicorouyere4078
@federicorouyere4078 7 ай бұрын
Excellent! You explain everything so clearly, even for a person who doesn't speak your language.
@codingwithroby
@codingwithroby 7 ай бұрын
Thank you for the kind words!
@user-hk4ch9kh1p
@user-hk4ch9kh1p 6 ай бұрын
Thank you for your explanation video! I had some problems to write code, but with your explanation, I'm sure that I can solve them! 😀
@codingwithroby
@codingwithroby 6 ай бұрын
You are so welcome, friend! I am glad you find it helpful
@pav19892
@pav19892 Жыл бұрын
Brother superb keep making videos like this So much interesting stuff
@codingwithroby
@codingwithroby Жыл бұрын
Heck yeah! Thanks for watching and enjoying the content 🙂
@cjacoby75
@cjacoby75 2 ай бұрын
Beautiful. Just what I wanted to know. Thank you.
@codingwithroby
@codingwithroby 2 ай бұрын
woot woot!
@nithinsamuel9995
@nithinsamuel9995 7 ай бұрын
Thank you so much for the video, Crisp and clear example
@codingwithroby
@codingwithroby 7 ай бұрын
Much appreciated! I am glad you were able to get value 🙂
@CamiloHamon
@CamiloHamon Ай бұрын
Thanks a lot Eric! 👏
@codingwithroby
@codingwithroby Ай бұрын
My pleasure!
@akazagaming1808
@akazagaming1808 10 ай бұрын
Thank you so much! Looking forward to your FARM stack. With you the best sir.
@codingwithroby
@codingwithroby 10 ай бұрын
Haha I feel like there was a hidden *wink wink* in your comment :-)
@akazagaming1808
@akazagaming1808 10 ай бұрын
wish you*, i just want to learn the FARM stack :< and i hope you can make a video on that.
@RedWyvern-vl7wg
@RedWyvern-vl7wg 5 күн бұрын
that was one of the best examples out there
@codingwithroby
@codingwithroby 4 күн бұрын
Aww thanks! You're awesome
@samserm
@samserm Жыл бұрын
Awesome!
@codingwithroby
@codingwithroby Жыл бұрын
Glad you are enjoying the content 😀
@kimelironald4451
@kimelironald4451 9 ай бұрын
Impressive presentaion! What I want to learn is relationship inside mongo db.
@codingwithroby
@codingwithroby 9 ай бұрын
Thank you! I really appreciate the kind words 🙂
@franku.n.1798
@franku.n.1798 10 ай бұрын
This is so awesome and is worth every time spent to follow the tutorial. thank you. however can you do a tutorial with FastApi + Mongodb + graphql + React ?
@codingwithroby
@codingwithroby 10 ай бұрын
Great suggestion! I will add this to my backlog of future content. I cannot promise when it will be created though 🙂
@franku.n.1798
@franku.n.1798 10 ай бұрын
@@codingwithroby I already appreciate the response. Am excited already
@ayushshaw3681
@ayushshaw3681 10 ай бұрын
Great videos. Keep up the good work.
@codingwithroby
@codingwithroby 10 ай бұрын
Thank you, friend! I am glad you were able to find value. Is there anything specific you would like to learn that I can add to my backlog?
@MahdiaAhmadi-bb6eh
@MahdiaAhmadi-bb6eh 2 ай бұрын
Thank you for the nice explanation, really appreciate your hard work in creating helpful content. and for the next videos, can you upload some videos about React js.
@codingwithroby
@codingwithroby 2 ай бұрын
Noted! Thanks for being here. Cheers!
@juanpablolopezfracaro6437
@juanpablolopezfracaro6437 10 ай бұрын
I like the video, however, I have a suggestion. Don't put the music that low, is just annoying. I don't care if there is no music (better for me) or mildly loud (I suppose better for someone), but that low is just annoying.
@codingwithroby
@codingwithroby 10 ай бұрын
Thanks for the suggestion! I’m trying to learn the perfect audio for everything (it’s harder than it may seem with everyone having different devices). Again, I appreciate the advice 🙂
@MrTomer157
@MrTomer157 6 ай бұрын
Awesome Thank you!
@codingwithroby
@codingwithroby 6 ай бұрын
You're welcome! I am glad you found value.
@jhaykei405
@jhaykei405 9 ай бұрын
Thanks Eric!
@codingwithroby
@codingwithroby 9 ай бұрын
You are so welcome!
@pallabdandapat1866
@pallabdandapat1866 3 ай бұрын
Thank you so much
@codingwithroby
@codingwithroby 3 ай бұрын
Of course!
@georgerussel
@georgerussel 6 ай бұрын
What if I would like to delete by "description"?
@jephtah737
@jephtah737 4 ай бұрын
can you do relationships on this Mongo DB with fastAPI that I can relate to your FastAPI Udemy course? i want to rebuild the project on that course but using Nosql
@SP-db6sh
@SP-db6sh Жыл бұрын
Can you plz create a video on user activity daily progress report app with FastApi, MongoDB, Streamlit ? Thank you for your humble effort
@codingwithroby
@codingwithroby Жыл бұрын
I'll add it to content I want to make in the future :-) Make sure you subscribe to get notified of all content!
@nolandgande7009
@nolandgande7009 5 ай бұрын
Thank you so much, that was a wonderful follow through video of monogdb and fastapi that i have ever come accress. Just one issue, I encountered this error [pymongo.errors.ConfigurationError: The DNS response does not contain an answer to the question: _mongodb._tcp.. IN SRV]. the python driver link is also different [python -m pip install "pymongo[srv]"==3.11]. I did install python 3.12 and tried but still facing the same error. tried searching the web but couldn't find solution to that. my initial python version was 3.11.7 Could you help me on that? Thank you
@saulo_foot
@saulo_foot 11 ай бұрын
So if I have multiple collections I must create a kind of list_serial for each collection?
@codingwithroby
@codingwithroby 11 ай бұрын
That is the best way for overall performance🙂
@dzmitry2408
@dzmitry2408 3 ай бұрын
@@codingwithrobywhy don’t you use .dict() method of pydantic models?
@a.s8840
@a.s8840 Жыл бұрын
Hi sir,can you please tell me a roadmap to learn python with data structures and algorithms and after that I want to look into backend also please please tell me ...
@codingwithroby
@codingwithroby Жыл бұрын
I have that coming in a future video 😀 the overall best advice would be to learn the absolute basics and then try to create a project. Creating a project will really help accelerate learning, as you find real life problems you need to try and solve!
@a.s8840
@a.s8840 Жыл бұрын
@@codingwithroby thank you sir
@Good-and-Geeky
@Good-and-Geeky Жыл бұрын
Would be cool to see how you can make use of these API in a web app. Flask or React ?? Probably Flask with it being easier...
@codingwithroby
@codingwithroby Жыл бұрын
Hmm interesting - so perhaps how you can use FastAPI as a BE along a React FE Project? Is this what you were thinking? Or how to use FastAPI to build full stack project using a server side rendering library?
@Good-and-Geeky
@Good-and-Geeky 11 ай бұрын
@@codingwithroby What I want to see is how to connect the front end to this. I have worked out using Jinja templates. So I have a form and I want the data to go to the Mongo database. Yes a full stack project using FastAPI, Mongo and with Jinja templates. I have been able to get this working Mongo and FastAPI. Also got FastAPI working to give web pages using Jinja templating . Struggling to get the three parts working together.
@kevinedwards1967
@kevinedwards1967 10 ай бұрын
Great content. Background music is a bit distracting in my opinion
@codingwithroby
@codingwithroby 10 ай бұрын
I am glad you were able to find value! Thank you for the suggestion!!
@alexes.bochkarev
@alexes.bochkarev 10 ай бұрын
Спасибо! Это достаточно просто
@user-sh1qb3ce5d
@user-sh1qb3ce5d 10 ай бұрын
i am getting Internal Server Error for the first get request,i was supposed to get empty, can you please help me out
@codingwithroby
@codingwithroby 10 ай бұрын
Hmm, what error is your application throwing? Anything pointing us in the right direction?
@manojkbn
@manojkbn 10 ай бұрын
Unable to ping to the database, Error: [SSL: CERTIFICATE_VERIFY_FAILED] while reloading the server.
@codingwithroby
@codingwithroby 10 ай бұрын
Hmm interesting, when are you getting that error?
@manojkbn
@manojkbn 10 ай бұрын
@@codingwithroby I was following/practicing your video and reached 8:12, I am using MacBook Air, and Python 3.12 in Virtual env. I completed your FastAPI + MySQL, it is an awesome stuff and big thanks for your efforts. 🙂
@muthusivaramakrishnan3578
@muthusivaramakrishnan3578 9 ай бұрын
@@manojkbnsame error bro if you get a solution pls help me out
@muthusivaramakrishnan3578
@muthusivaramakrishnan3578 9 ай бұрын
Same device even 😂
@muthusivaramakrishnan3578
@muthusivaramakrishnan3578 9 ай бұрын
Bro I fixed that error it’s quite of a dumb fix I downgraded my version to 3.11 and then used tlsCAFile=certifi.where() in order to avoid that certificate issue I hope it helps
@jasonjasonjason3030
@jasonjasonjason3030 7 ай бұрын
11:03 is there a piano in the background
@codingwithroby
@codingwithroby 7 ай бұрын
Haha - it is the background music. I have increased the background music of recent videos. You live and you learn!
@Khanzaki1
@Khanzaki1 9 ай бұрын
can you provide the github repo
@codingwithroby
@codingwithroby 9 ай бұрын
I am sorry, I did not save the code repository for this video.
@yuha4894
@yuha4894 11 ай бұрын
thank you
@codingwithroby
@codingwithroby 11 ай бұрын
You are so welcome!
How to build a FastAPI app with PostgreSQL
27:37
Eric Roby
Рет қаралды 38 М.
How to build a React + FastAPI application (Full Stack Guide)
51:07
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 78 МЛН
⬅️🤔➡️
00:31
Celine Dept
Рет қаралды 51 МЛН
Каха ограбил банк
01:00
К-Media
Рет қаралды 10 МЛН
She ruined my dominos! 😭 Cool train tool helps me #gadget
00:40
Go Gizmo!
Рет қаралды 62 МЛН
What is an API Explained in 1 minute #shorts
0:46
Learn with Whiteboard
Рет қаралды 179 М.
MongoDB in Python - NoSQL Document Database
24:33
NeuralNine
Рет қаралды 42 М.
FARM Stack Course - FastAPI, React, MongoDB
1:02:04
freeCodeCamp.org
Рет қаралды 146 М.
Why You NEED To Learn FastAPI | Hands On Project
21:15
Travis Media
Рет қаралды 150 М.
Pydantic Tutorial • Solving Python's Biggest Problem
11:07
pixegami
Рет қаралды 245 М.
FastAPI with Jinja2 in UNDER 6 minutes
6:02
Eric Roby
Рет қаралды 15 М.
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 78 МЛН