Unlocking the Power of NoSQL: FastAPI with MongoDB
Вставка
- Опубліковано 5 жов 2024
- 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/...
Learn Chatbot Development: www.udemy.com/...
===========================
🛒 GEAR & RECOMMENDED BOOKS: kit.co/codingw...
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
Python 3.12 is out now in pre-release! Like & comment what you want to learn next 🙂
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
Awesome additional information!
Or maybe you can use motor instead of pymongo, it supports async await. Is this correct?
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!
This is awesome 🙂 thank you for the nice message!!
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.
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 🙂
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.
Impressive presentaion! What I want to learn is relationship inside mongo db.
Thank you! I really appreciate the kind words 🙂
Excellent! You explain everything so clearly, even for a person who doesn't speak your language.
Thank you for the kind words!
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! 😀
You are so welcome, friend! I am glad you find it helpful
Brother superb keep making videos like this
So much interesting stuff
Heck yeah! Thanks for watching and enjoying the content 🙂
that was one of the best examples out there
Aww thanks! You're awesome
great video, was much of help, thanks
You're welcome!
Thanks a lot Eric! 👏
My pleasure!
excellent vid! Look fwd to seeing more!!
Glad you enjoyed it! ❤️
Beautiful. Just what I wanted to know. Thank you.
woot woot!
Thank you so much! Looking forward to your FARM stack. With you the best sir.
Haha I feel like there was a hidden *wink wink* in your comment :-)
wish you*, i just want to learn the FARM stack :< and i hope you can make a video on that.
Awesome!
Glad you are enjoying the content 😀
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 ...
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!
@@codingwithroby thank you sir
Thank you so much for the video, Crisp and clear example
Much appreciated! I am glad you were able to get value 🙂
What if I would like to delete by "description"?
Great videos. Keep up the good work.
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?
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 ?
Great suggestion! I will add this to my backlog of future content. I cannot promise when it will be created though 🙂
@@codingwithroby I already appreciate the response. Am excited already
Can you plz create a video on user activity daily progress report app with FastApi, MongoDB, Streamlit ?
Thank you for your humble effort
I'll add it to content I want to make in the future :-) Make sure you subscribe to get notified of all content!
So if I have multiple collections I must create a kind of list_serial for each collection?
That is the best way for overall performance🙂
@@codingwithrobywhy don’t you use .dict() method of pydantic models?
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.
Noted! Thanks for being here. Cheers!
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
Thanks Eric!
You are so welcome!
Unable to ping to the database, Error: [SSL: CERTIFICATE_VERIFY_FAILED] while reloading the server.
Hmm interesting, when are you getting that error?
@@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. 🙂
@@manojkbnsame error bro if you get a solution pls help me out
Same device even 😂
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
Great content. Background music is a bit distracting in my opinion
I am glad you were able to find value! Thank you for the suggestion!!
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
Thank you so much
Of course!
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...
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?
@@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.
Awesome Thank you!
You're welcome! I am glad you found value.
11:03 is there a piano in the background
Haha - it is the background music. I have increased the background music of recent videos. You live and you learn!
i am getting Internal Server Error for the first get request,i was supposed to get empty, can you please help me out
Hmm, what error is your application throwing? Anything pointing us in the right direction?
can you provide the github repo
I am sorry, I did not save the code repository for this video.
Спасибо! Это достаточно просто
thank you
You are so welcome!