Hi everyone, I hope you enjoyed this course as much as I enjoyed creating it! This experience has been a great learning journey for me, both in diving deeper into FastAPI and in refining how I teach technical topics like this. If you found the course valuable, please like and share it with anyone who’s interested in learning FastAPI. You can find all the course details here jod35.github.io/fastapi-beyond-crud-docs/site/. Thanks for watching!
can you make lesson about upload file like forms, .zip, images to the path, I really need it, I am looking for whole RUclips, but there are no best one. Because they shows only one thing, but there are a lot of things. For example, id, book_name, book_path, created_at and book file which is .pdf ot .zip. If you do, I really enjoy that.
Hi Ssali, Thanks for such a n informative course. I noticed that on the "tags", there are some omissions: class BookTag says Table = True, but there is no table name. Further, the tags are not linked to the Book table??? I am new to Python and am not able to sort out these on my own. class BookTag(SQLModel, table=True): book_id: uuid.UUID = Field(default=None, foreign_key="books.uid", primary_key=True) tag_id: uuid.UUID = Field(default=None, foreign_key="tags.uid", primary_key=True) class Tag(SQLModel, table=True): __tablename__ = "tags" uid: uuid.UUID = Field( sa_column=Column(pg.UUID, nullable=False, primary_key=True, default=uuid.uuid4) ) name: str = Field(sa_column=Column(pg.VARCHAR, nullable=False)) created_at: datetime = Field(sa_column=Column(pg.TIMESTAMP, default=datetime.now)) books: List["Book"] = Relationship( link_model=BookTag, back_populates="tags", sa_relationship_kwargs={"lazy": "selectin"}, ) def __repr__(self) -> str: return f""
Just in case it is hard to go through the timeline, (00:00:00) Introduction (00:01:00) Project set up (00:07:30) Build a simple web server (00:10:45) Run the server with FastAPI CLI (00:14:11) Path parameters (00:17:23) Choosing an HTTP client (00:20:58) Query Parameters (00:24:40) Using Path and Query parameters (00:26:51) Optional Query parameters (00:31:48) Request Body (00:39:11) Reading and setting headers (00:49:43) Build a REST API on a Python List (01:23:37) Organizing API Paths with Routers (01:38:22) Databases With SQLModel (01:42:33) Setting up a database (01:44:13) Settings management with Pydantic settings (01:53:38) Async SQLModel set up (01:58:38) Database connection with lifespan events (02:10:02) Creating a database model with SQLModel (02:20:00) Creating database tables (02:27:08) CRUD With SQLModel (02:29:48) Separate CRUD logic using service classes (02:55:53) Intro to Dependency Injection (03:01:20) Use service methods in API path handlers (03:33:35) Create the user auth model (03:42:09) Database Migrations With Alembic (03:59:57) User Account Creation (04:18:55) Password hashing with passlib (04:25:42) User Account Creation endpoint (04:42:57) Intro to JWT Authentication (04:48:29) PyJWT Set Up (05:01:13) User Login Endpoint (05:13:59) HTTP Bearer Authentication (05:33:14) Regaining Access with refresh tokens (05:50:04) Revoking Tokens using Redis (06:07:39) Role-Based Access Control (06:09:45) Get the currently authenticated user (06:20:25) Adding roles to the user model (06:26:55) Creating the Role Checker dependency (06:39:24) Handling Model And Schema Relationships (07:05:53) More Model And Schema Relationships (07:59:58) Error Handling (08:04:06) Create custom API Exceptions (08:18:14) Creating exception handlers for those exceptions (08:23:26) Register Error handlers on the app (08:33:25) Intro to Middleware (08:36:54) Creating a custom logging middleware (08:53:28) Another middleware example (08:59:36) Using Custom ASGI middleware with FastAPI (09:00:21) Adding CORS Middleware (09:03:34) Adding Trusted Hosts (09:05:04) Adding Email support (09:06:39) Setting Up FastAPI-Mail (09:21:46) Sending your first email (09:31:21) User account verification (10:07:51) Password Resets (10:40:38) Background Tasks (10:43:00) FastAPI Background Tasks (10:45:44) Background Tasks with Celery and Redis (11:16:17) Celery Monitoring With Flower (11:23:48) API Documentation with SwaggerUI And Redoc (11:36:02) API Testing (11:37:10) Unit testing with Unittest Mock And Pytest (12:01:27) Document-driven Testing with Schemathesis (12:09:17) Deployment On Render.com
Hi everyone! I apologize for the slight drop in video quality-I had to compress it to ensure it could be uploaded without any issues before RUclips rejected it.
This channel is such a goldmine, I love how you not only teach how to use backend frameworks but you also teach how to structure the project as it scales. Keep up the great work man, you are very bright!
I usually don't comment but this Tuto is just amazing! You covered pretty much all the topics from basic to advance. Thanks for your work. I was able to build an API for my front-end app! You definitely earned one sub
If you have an error, 'validation error for settings db_url' when try to 1:52:55 try this DOTENV = os.path.join(os.path.dirname(__file__), ".env") code above settings class. And env_file inside the model_config file should be env_file=DOTENV, other things just same. This solution works for me.
I am coming from the JavaSCript/TypeScript ecosystem, so I was aware of these concepts but didn't know how to implement them in fastAPI. Your video and website helped me to learn it faster. Thanks Buddy
I got struck for a while as i couldn't understand why refresh_tokens and logout endpoints couldn't work , realised that i had to install redis on windows and then everything worked fine. Thank you for the Awesome course @SsaliJonathan .
I am glad you found it helpful. If you have any further questions and suggestions, kindly reach to me in discord using the link in my about section. Thanks
Thanks for making this tutorial. I'm beginner with python and making apis / backend with it, but i understood everything so far. I'm learning to make backend api for my flutter mobile app.
Sincerely speaking, the course was mind blowing. I request to have a physical chat with you anytime your available. Thanks and much Love from Kasana Luweero
This is a gem! Thank you for the hard work and time you have put into creating this profound course. God bless you. Please kindly create a FastAPI Microservices course. Thank you once again.
Good work. I really like that you show example of structure as this becomes important in real world projects. lol, I was afraid of the length of 12hrs, but you have held my attention. Thanks.
@@SsaliJonathan Finally finished the whole tutorial. Riveting, and useful. Thanks for all your work. I have one error left "in _load_backend_mixin version = _bcrypt.__about__.__version__"... but so far the error doesn't make any difference, but if you know what this is, please let me know.
🎉you've done a great job so far brother though I've not been able to complete the videos up till now 😅😅. But really brother, this cause is a life saver. Thanks for it and I hope we get more cool courses like often. Please don't forget my request as well boss
5:04:50 According to fastapi docs instead of session : AsyncSession = Depends(get_session), session : Annotated[AsyncSession, Depends(get_session)] might be better approach.
hi, I expect the course to build a real project following industry standards, solving a real-world problem, and applying the latest technologies. I am willing to pay on a subscription basis rather than just a simple CRUD course. What do you think about building a microervice RUclips clone application using fastapi?
Hi there, thanks for sharing your thoughts. From my experience, the projects you find on RUclips generally focus on demonstrating concepts rather than reflecting full-scale, real-world complexities-those are more often encountered on the job. I’m currently working on a micro-service course to be released later this year, though I wouldn’t call it entirely “real-world” either. My aim is to provide a practical learning experience that helps you understand the key principles involved.
@@SsaliJonathan hi, This is the syllabus for a microservices course that you can refer to. The reason I expect an advanced and in-depth course is that it helps us get jobs, knowing what practical coding tasks are required. The most important thing is the job itself, and that's the most crucial reason. There are many CRUD courses available here, but they don't lead to employment for us. Could you release a paid subscription-based course here or on Udemy? You are a backend expert, so I trust you
@@SsaliJonathan MODULE 1: PYTHON OOP, SOLID FAST API & RESTful API Microservices Important patterns commonly used in backend architecture MODULE 2: PROJECT ANALYSIS & DATABASE DESIGN Project analysis: From UI -> User Story -> Features & APIs -> Database Understanding metrics: data load, data generation speed Microservices system design (basic) Shared insights on enhancing data access speed Revise & practice: OOP, SOLID, DATABASE MODULE 3: FAST API & RESTFUL API MICROSERVICES RESTful API: From definition to common standards Data structure standardization for Response & Error handling Model structure independent of services Communication with database, third parties, and other services MODULE 4: HEXAGONAL ARCHITECTURE Hexagonal Architecture (including Onion, Clean Architecture) Mastering Dependency Inversion/Injection to increase service flexibility Understanding Ports, Adapters, and Repository through the application of DIP principles Modular structure for services, transitioning between Monolithic and Microservices MODULE 5: AUTHENTICATION & AUTHORIZATION WITH JWT Practice: Building API & Hexagonal Architecture Authentication & Authorization service Best practices for JWT in Microservices Setting up Identity Service in Microservices MODULE 6: MICROSERVICES ARCHITECTURE AND APPLICATION Microservices: From theory to practice Case studies: When to use or avoid using Microservices Effective strategies for Microservices development Communication methods between services: Query/Aggregator and Command Transitioning from Monolithic to Microservices and vice versa MODULE 7: EVENT-DRIVEN ARCHITECTURE, QUEUE & PUBSUB Event-Driven Architecture & Event-Storming, Event Sourcing Effective Event-Driven applications Mastering Queue vs. PubSub and their applications Basics of CQS, CQRS, SAGA, Outbox Practice BONUS: UPLOAD SERVICE (IMAGE & MEDIA) - AWS S3 Upload service for the entire system Uploading files to local and remote storage (AWS S3) Using AWS CloudFront to access uploaded media Best practices for upload flow and efficient media management MODULE 8: CACHING AND CACHING STRATEGIES Caching with Redis Caching Strategy in microservices Common caching mistakes to avoid Sharing caching experiences (commonly asked in interviews) MODULE 9: PACKAGING & DEPLOYING APPLICATIONS WITH DOCKER Linux, Docker and its components Building Docker images with Dockerfile Deploying applications with Docker Basic CI/CD with GitHub Action MODULE 10: FUNDAMENTALS: LOAD BALANCER, API GATEWAY, SERVICE MESH/PROXY, SERVICE DISCOVERY Basic system design: Load Balancer, API Gateway, Service Mesh/Proxy, Service Discovery Commonly used architectural patterns Sharing some common high-load patterns (that may be encountered in interviews). Revise & practice: Caching, Docker & Common System Patterns. MODULE 11: FINAL COURSE PROJECT
Thanks so much for this video it was extremely helpful to me. I interested to learn where you learnt your your approach and structure of the application from? thanks again
Hey there! I appreciate your kind comment. The project structure wasn’t inspired by any project. It’s something I built as I went on in the series. In fact, I changed it many times
@@SsaliJonathan Thanks for the response, it is interesting because it seems really hard to find good examples of production ready RestAPI's in any language even in the paid for courses. I appreciate your approach it seems logical and clean to me which I believe is what you want to help debug and for the code to make sense when you return to it after many years. thanks
Interesting course however nowadays for more readability and working in a team type hinting is really helpful so please in your next video add type hinting and doc strings thanks
Thank you so much, brother! I started watching the video from zero, the only thing i had was very good basics of Python language. I understood everything in this video and it helped me a lot to progress. P.S. Do you think it's a good idea to use your project (the currenct one) for intern positions as Backend Python Dev or i should focus on more complicated projects? Thanks in advance! Wish you all the best!
I think the best approach is to get you’re interested in. those projects can be as simple as what you’re interested in like your hobbies and then by building those you’ll have at least some projects that you will be proud of showing and you live in solve problems that you’re having in real life That’s my approach to learn these things but anyway, Thank you so much for watching. I really appreciate.
I get this error when creating the server at 2:09:22. -> InvalidRequestError: The asyncio extension requires an async driver to be used. The loaded 'psycopg2' is not async. Anyone else faced this and successfully resolved?
@@SsaliJonathan Thanks. I was able to make it work with asyncpg with 1 additional modification -> Removing the sslmode query parameter from the DATABASE_URL.
Great tutorial man! I am stuck in the part where you are creating new table named Users. In my case, the alembic is not able to detect the creation of users table. Am I missing something?
@@SsaliJonathan Thanks! FYI, the issue is resolved. Idk what was the issue, when I refreshed the vscode, it was able to detect the change. Maybe my save button wasn’t working lol😁
@@SsaliJonathan Hey man, I really appreciate the efforts you have put into making this video! I am currently on the part where you setup background task. I have already done that multiple times using celery, so wont take long to understand the concept. One thing, I just found a bug in the repo. Is there any way I can contribute to the code? Thanks🙏🏻
I couldn't understand exactly how the refresh token and access token mechanism works, especially where should we store the refresh token? When it expires, what will happen? When user logout also refresh tokeh expires? I have a a lot of question about refresh token lifespan?
Nice Question. You can also add refresh tokens to blacklists if they are expired or not to be used. In a scenario where you find yourself with an expired refresh tokens, you can create a new token pair. It all comes down to the flow of auth you have for your app.
Hey, thanks for watching. I am planning on creating these for later updates to this course. I got to the point where the course was getting a lot longer than I expected. Given that I do most of the work alone, I decided to end it at the length of this. I am planning on adding these topics
@@SsaliJonathan I really appreciate your rest API course but please if you can work on more advanced tutorial even if it's a live would really appreciate 🙏
Async is good for performance reasons. When you use async, you write code that can handle multiple concurrent requests. I’ll make videos in the future explaining this
Vscode will do the syntax highlighting for Python. In my setup I have the Limey theme, I am also using the Python Vscode extension. There is also Black for code formatting
Can somebody help me with this? I am not sure why but I am getting this error while running the server, it is according to my research it is after I call init_db() [time: 2hrs:09min in video]. InvalidRequestError: The asyncio extension requires an async driver to be used. The loaded 'psycopg2' is not async.
Try looking at your Postgres URI. You may be providing one that starts with Postgres://. You need to provide one that has postgresql+asyncpg:// . Also make sure you have asyncpg installed. Hope that helps.
@@SsaliJonathan Man... Thank you very much, I just added postgresql+asyncpg:// in the start and it worked like charm. Thanks a lot man. I really appreciate this kind of support.
@@SsaliJonathan hi, I expect the course to build a real project following industry standards, solving a real-world problem, and applying the latest technologies. I am willing to pay on a subscription basis rather than just a simple CRUD course. What do you think about building a microervice RUclips clone application using fastapi?
hi jonathan I've a problem, I can't connect my db with fastapi the CLI rerurn me this msg : "home/b2pic/Desktop/bookly/src/__init__.py:10: RuntimeWarning: coroutine 'initdb' was never awaited initdb()/" can you or anyone help me to fix it please
Just in case it is hard to go through the timeline, (00:00:00) Introduction (00:01:00) Project set up (00:07:30) Build a simple web server (00:10:45) Run the server with FastAPI CLI (00:14:11) Path parameters (00:17:23) Choosing an HTTP client (00:20:58) Query Parameters (00:24:40) Using Path and Query parameters (00:26:51) Optional Query parameters (00:31:48) Request Body (00:39:11) Reading and setting headers (00:49:43) Build a REST API on a Python List (01:23:37) Organizing API Paths with Routers (01:38:22) Databases With SQLModel (01:42:33) Setting up a database (01:44:13) Settings management with Pydantic settings (01:53:38) Async SQLModel set up (01:58:38) Database connection with lifespan events (02:10:02) Creating a database model with SQLModel (02:20:00) Creating database tables (02:27:08) CRUD With SQLModel (02:29:48) Separate CRUD logic using service classes (02:55:53) Intro to Dependency Injection (03:01:20) Use service methods in API path handlers (03:33:35) Create the user auth model (03:42:09) Database Migrations With Alembic (03:59:57) User Account Creation (04:18:55) Password hashing with passlib (04:25:42) User Account Creation endpoint (04:42:57) Intro to JWT Authentication (04:48:29) PyJWT Set Up (05:01:13) User Login Endpoint (05:13:59) HTTP Bearer Authentication (05:33:14) Regaining Access with refresh tokens (05:50:04) Revoking Tokens using Redis (06:07:39) Role-Based Access Control (06:09:45) Get the currently authenticated user (06:20:25) Adding roles to the user model (06:26:55) Creating the Role Checker dependency (06:39:24) Handling Model And Schema Relationships (07:05:53) More Model And Schema Relationships (07:59:58) Error Handling (08:04:06) Create custom API Exceptions (08:18:14) Creating exception handlers for those exceptions (08:23:26) Register Error handlers on the app (08:33:25) Intro to Middleware (08:36:54) Creating a custom logging middleware (08:53:28) Another middleware example (08:59:36) Using Custom ASGI middleware with FastAPI (09:00:21) Adding CORS Middleware (09:03:34) Adding Trusted Hosts (09:05:04) Adding Email support (09:06:39) Setting Up FastAPI-Mail (09:21:46) Sending your first email (09:31:21) User account verification (10:07:51) Password Resets (10:40:38) Background Tasks (10:43:00) FastAPI Background Tasks (10:45:44) Background Tasks with Celery and Redis (11:16:17) Celery Monitoring With Flower (11:23:48) API Documentation with SwaggerUI And Redoc (11:36:02) API Testing (11:37:10) Unit testing with Unittest Mock And Pytest (12:01:27) Document-driven Testing with Schemathesis (12:09:17) Deployment On Render.com
Hi everyone, I hope you enjoyed this course as much as I enjoyed creating it! This experience has been a great learning journey for me, both in diving deeper into FastAPI and in refining how I teach technical topics like this. If you found the course valuable, please like and share it with anyone who’s interested in learning FastAPI. You can find all the course details here jod35.github.io/fastapi-beyond-crud-docs/site/. Thanks for watching!
can you make lesson about upload file like forms, .zip, images to the path, I really need it, I am looking for whole RUclips, but there are no best one. Because they shows only one thing, but there are a lot of things. For example, id, book_name, book_path, created_at and book file which is .pdf ot .zip. If you do, I really enjoy that.
Thank you Bro
Hi Ssali,
Thanks for such a n informative course.
I noticed that on the "tags", there are some omissions:
class BookTag says Table = True, but there is no table name. Further, the tags are not linked to the Book table??? I am new to Python and am not able to sort out these on my own.
class BookTag(SQLModel, table=True):
book_id: uuid.UUID = Field(default=None, foreign_key="books.uid", primary_key=True)
tag_id: uuid.UUID = Field(default=None, foreign_key="tags.uid", primary_key=True)
class Tag(SQLModel, table=True):
__tablename__ = "tags"
uid: uuid.UUID = Field(
sa_column=Column(pg.UUID, nullable=False, primary_key=True, default=uuid.uuid4)
)
name: str = Field(sa_column=Column(pg.VARCHAR, nullable=False))
created_at: datetime = Field(sa_column=Column(pg.TIMESTAMP, default=datetime.now))
books: List["Book"] = Relationship(
link_model=BookTag,
back_populates="tags",
sa_relationship_kwargs={"lazy": "selectin"},
)
def __repr__(self) -> str:
return f""
@@SsaliJonathan No worries, rich content is more helpful than little quality down
Bro I can't believe you put this content out for free.
You've literally taught me backend, not just fast API
Thanks buddy
Just in case it is hard to go through the timeline,
(00:00:00) Introduction
(00:01:00) Project set up
(00:07:30) Build a simple web server
(00:10:45) Run the server with FastAPI CLI
(00:14:11) Path parameters
(00:17:23) Choosing an HTTP client
(00:20:58) Query Parameters
(00:24:40) Using Path and Query parameters
(00:26:51) Optional Query parameters
(00:31:48) Request Body
(00:39:11) Reading and setting headers
(00:49:43) Build a REST API on a Python List
(01:23:37) Organizing API Paths with Routers
(01:38:22) Databases With SQLModel
(01:42:33) Setting up a database
(01:44:13) Settings management with Pydantic settings
(01:53:38) Async SQLModel set up
(01:58:38) Database connection with lifespan events
(02:10:02) Creating a database model with SQLModel
(02:20:00) Creating database tables
(02:27:08) CRUD With SQLModel
(02:29:48) Separate CRUD logic using service classes
(02:55:53) Intro to Dependency Injection
(03:01:20) Use service methods in API path handlers
(03:33:35) Create the user auth model
(03:42:09) Database Migrations With Alembic
(03:59:57) User Account Creation
(04:18:55) Password hashing with passlib
(04:25:42) User Account Creation endpoint
(04:42:57) Intro to JWT Authentication
(04:48:29) PyJWT Set Up
(05:01:13) User Login Endpoint
(05:13:59) HTTP Bearer Authentication
(05:33:14) Regaining Access with refresh tokens
(05:50:04) Revoking Tokens using Redis
(06:07:39) Role-Based Access Control
(06:09:45) Get the currently authenticated user
(06:20:25) Adding roles to the user model
(06:26:55) Creating the Role Checker dependency
(06:39:24) Handling Model And Schema Relationships
(07:05:53) More Model And Schema Relationships
(07:59:58) Error Handling
(08:04:06) Create custom API Exceptions
(08:18:14) Creating exception handlers for those exceptions
(08:23:26) Register Error handlers on the app
(08:33:25) Intro to Middleware
(08:36:54) Creating a custom logging middleware
(08:53:28) Another middleware example
(08:59:36) Using Custom ASGI middleware with FastAPI
(09:00:21) Adding CORS Middleware
(09:03:34) Adding Trusted Hosts
(09:05:04) Adding Email support
(09:06:39) Setting Up FastAPI-Mail
(09:21:46) Sending your first email
(09:31:21) User account verification
(10:07:51) Password Resets
(10:40:38) Background Tasks
(10:43:00) FastAPI Background Tasks
(10:45:44) Background Tasks with Celery and Redis
(11:16:17) Celery Monitoring With Flower
(11:23:48) API Documentation with SwaggerUI And Redoc
(11:36:02) API Testing
(11:37:10) Unit testing with Unittest Mock And Pytest
(12:01:27) Document-driven Testing with Schemathesis
(12:09:17) Deployment On Render.com
Hi everyone! I apologize for the slight drop in video quality-I had to compress it to ensure it could be uploaded without any issues before RUclips rejected it.
This channel is such a goldmine, I love how you not only teach how to use backend frameworks but you also teach how to structure the project as it scales. Keep up the great work man, you are very bright!
I’m honestly honored to have you learn from my content. I tried my best. Thanks for watching
Please make mega project on fast api
@@SsaliJonathanplease make a huge project using fast api
I usually don't comment but this Tuto is just amazing! You covered pretty much all the topics from basic to advance. Thanks for your work. I was able to build an API for my front-end app! You definitely earned one sub
Thanks so much for the kind comment. I’m glad my video has been valuable to you. I promise to make more valuable content
best content I've ever seen about fast api
I’m glad you like it. Thanks for watching
If you have an error, 'validation error for settings db_url' when try to 1:52:55 try this DOTENV = os.path.join(os.path.dirname(__file__), ".env") code above settings class. And env_file inside the model_config file should be env_file=DOTENV, other things just same. This solution works for me.
Thanks for making it clear
I am coming from the JavaSCript/TypeScript ecosystem, so I was aware of these concepts but didn't know how to implement them in fastAPI. Your video and website helped me to learn it faster.
Thanks Buddy
I’m really glad that my video helped you. Thanks for the kind comment
Started learning fastapi with you now.....!
Milestone: complete all on this weekend....!
Wow. That’s impressive. How did you find it?
this is really good Course on the FAST API
Amazing course, completed the quator of it, just up to the point.
Thanks man!
Glad you enjoyed it. Thanks for watching
Hope you Keep continuing the amazing work really blown away by the content didn't expect this to be free,please make more content on FASTAPI
I’m glad it helped
thanks for this amazing course and we need microservice arcithecture implementation using FastAPI
I got struck for a while as i couldn't understand why refresh_tokens and logout endpoints couldn't work , realised that i had to install redis on windows and then everything worked fine. Thank you for the Awesome course @SsaliJonathan .
I am glad you found it helpful. If you have any further questions and suggestions, kindly reach to me in discord using the link in my about section. Thanks
I liked the video and subscribed. Watched content till 3 hr timestamp, really good stuff. Will implement till this part now.
Glad it was helpful! Thanks for watching. Kindly ask if you have any concerns.
Thanks for making this tutorial. I'm beginner with python and making apis / backend with it, but i understood everything so far. I'm learning to make backend api for my flutter mobile app.
I’m glad you found value out of my course. Thanks for watching
Sincerely speaking, the course was mind blowing. I request to have a physical chat with you anytime your available. Thanks and much Love from Kasana Luweero
I actually ive in Bombo. We can meet at this year's Pycon Uganda.
This is a gem! Thank you for the hard work and time you have put into creating this profound course. God bless you. Please kindly create a FastAPI Microservices course. Thank you once again.
I’m glad you found value in this course. I’m working on creating a micro services playlist.
@@SsaliJonathan Thank you. Looking forward to it.
Really amazing course. I was really struggling to get something like this. Best content for Fastapi.
Thank you
I’m glad you’ve found value in my content. Thanks for watching
Good work. I really like that you show example of structure as this becomes important in real world projects. lol, I was afraid of the length of 12hrs, but you have held my attention. Thanks.
I am glad you have really held on to the video. Kindly tell me how you will feel about it at the end.
@@SsaliJonathan Finally finished the whole tutorial. Riveting, and useful. Thanks for all your work.
I have one error left "in _load_backend_mixin version = _bcrypt.__about__.__version__"... but so far the error doesn't make any difference, but if you know what this is, please let me know.
Never mind, I rewrote the hash password defs to avoid using the passlib.
wao!! el más completo curso de FastApi de la historia.
Muchas felicidades y gracias!! :D
Me alegro mucho que te haya gustado este vídeo. No sé español pero utilicé Google Translate. Gracias por mirar.
Thanks for all you do! 🙌
Welcome
Damn this is what I have prayed for a long time , glad my prayers was answered here ❤
Glad you like my video. Thanks
شكرًا
Thanks so much
wow thanks for this man !
Glad you liked it. Thanks for watching
You did real good.... Well done
I’m glad you like the video. Thanks for watching
Great in-depth course here🎉 💯
Thanks David. I appreciate the feedback 🙏
I appreciate your efforts.. thanks
🙏
awesome tutorial!! thank you so much
I’m glad you found value out of it.
Un excelente curso, muchas felicitaciones
Gracias 🙏
This is really good tutorial
Timestamps to remember where I am at:
27:08
40:59
54:00
01:04:00
1:41:00
2:10:00
2:35:00
this is gold, thank you!
Thanks
Great job. We will appreciate you making something like this but on Django with databases like Postgres, Mongo or MySQL.
I am glad you found value in my work.Will consider doing that in the future
🎉you've done a great job so far brother though I've not been able to complete the videos up till now 😅😅.
But really brother, this cause is a life saver. Thanks for it and I hope we get more cool courses like often.
Please don't forget my request as well boss
I am glad you like it, You will get the courses.
Great tutorial ❤❤❤
Thanks for watching.
it's really significant 💡
thanks for helpful content
It's my pleasure
Great , Thanks ,Keep it coming!!!
Thanks
Thanks Brother
Thanks for watching
Great video
Glad you enjoyed it
Thanks Mr Jonathan
Welcome Prashant. Thanks for watching
Great, thank you.
You are welcome!
5:04:50
According to fastapi docs instead of session : AsyncSession = Depends(get_session),
session : Annotated[AsyncSession, Depends(get_session)] might be better approach.
It is quite the same. you are using types in your approach. Annotated means you add metadata to the dependency. Thanks for the suggestion.
@@SsaliJonathan Thank you for reply, I watched your video with pleasure and it taught me a lot.
hi, I expect the course to build a real project following industry standards, solving a real-world problem, and applying the latest technologies. I am willing to pay on a subscription basis rather than just a simple CRUD course. What do you think about building a microervice RUclips clone application using fastapi?
Hi there, thanks for sharing your thoughts. From my experience, the projects you find on RUclips generally focus on demonstrating concepts rather than reflecting full-scale, real-world complexities-those are more often encountered on the job. I’m currently working on a micro-service course to be released later this year, though I wouldn’t call it entirely “real-world” either. My aim is to provide a practical learning experience that helps you understand the key principles involved.
@@SsaliJonathan hi, This is the syllabus for a microservices course that you can refer to. The reason I expect an advanced and in-depth course is that it helps us get jobs, knowing what practical coding tasks are required. The most important thing is the job itself, and that's the most crucial reason. There are many CRUD courses available here, but they don't lead to employment for us. Could you release a paid subscription-based course here or on Udemy? You are a backend expert, so I trust you
@@SsaliJonathan
MODULE 1: PYTHON OOP, SOLID
FAST API & RESTful API Microservices
Important patterns commonly used in backend architecture
MODULE 2: PROJECT ANALYSIS & DATABASE DESIGN
Project analysis: From UI -> User Story -> Features & APIs -> Database
Understanding metrics: data load, data generation speed
Microservices system design (basic)
Shared insights on enhancing data access speed
Revise & practice: OOP, SOLID, DATABASE
MODULE 3: FAST API & RESTFUL API MICROSERVICES
RESTful API: From definition to common standards
Data structure standardization for Response & Error handling
Model structure independent of services
Communication with database, third parties, and other services
MODULE 4: HEXAGONAL ARCHITECTURE
Hexagonal Architecture (including Onion, Clean Architecture)
Mastering Dependency Inversion/Injection to increase service flexibility
Understanding Ports, Adapters, and Repository through the application of DIP principles
Modular structure for services, transitioning between Monolithic and Microservices
MODULE 5: AUTHENTICATION & AUTHORIZATION WITH JWT
Practice: Building API & Hexagonal Architecture
Authentication & Authorization service
Best practices for JWT in Microservices
Setting up Identity Service in Microservices
MODULE 6: MICROSERVICES ARCHITECTURE AND APPLICATION
Microservices: From theory to practice
Case studies: When to use or avoid using Microservices
Effective strategies for Microservices development
Communication methods between services: Query/Aggregator and Command
Transitioning from Monolithic to Microservices and vice versa
MODULE 7: EVENT-DRIVEN ARCHITECTURE, QUEUE & PUBSUB
Event-Driven Architecture & Event-Storming, Event Sourcing
Effective Event-Driven applications
Mastering Queue vs. PubSub and their applications
Basics of CQS, CQRS, SAGA, Outbox
Practice
BONUS: UPLOAD SERVICE (IMAGE & MEDIA) - AWS S3
Upload service for the entire system
Uploading files to local and remote storage (AWS S3)
Using AWS CloudFront to access uploaded media
Best practices for upload flow and efficient media management
MODULE 8: CACHING AND CACHING STRATEGIES
Caching with Redis
Caching Strategy in microservices
Common caching mistakes to avoid
Sharing caching experiences (commonly asked in interviews)
MODULE 9: PACKAGING & DEPLOYING APPLICATIONS WITH DOCKER
Linux, Docker and its components
Building Docker images with Dockerfile
Deploying applications with Docker
Basic CI/CD with GitHub Action
MODULE 10: FUNDAMENTALS: LOAD BALANCER, API GATEWAY, SERVICE MESH/PROXY, SERVICE DISCOVERY
Basic system design: Load Balancer, API Gateway, Service Mesh/Proxy, Service Discovery
Commonly used architectural patterns
Sharing some common high-load patterns (that may be encountered in interviews).
Revise & practice: Caching, Docker & Common System Patterns.
MODULE 11: FINAL COURSE PROJECT
Really enjoyed, please upload how to adding ratelimit to endpoints using slowapi or fastapi-limiter please✨
I’m really glad that you enjoyed the video. Will make it a point to have these made. Thanks for watching
Awsome tutorial. Plz can you make on tutorial on microser vices.
Rest assured. I will make one.
hello, thank you for video
Welcome
Thanks so much for this video it was extremely helpful to me. I interested to learn where you learnt your your approach and structure of the application from? thanks again
Hey there! I appreciate your kind comment. The project structure wasn’t inspired by any project. It’s something I built as I went on in the series. In fact, I changed it many times
@@SsaliJonathan Thanks for the response, it is interesting because it seems really hard to find good examples of production ready RestAPI's in any language even in the paid for courses. I appreciate your approach it seems logical and clean to me which I believe is what you want to help debug and for the code to make sense when you return to it after many years. thanks
Interesting course however nowadays for more readability and working in a team type hinting is really helpful so please in your next video add type hinting and doc strings thanks
Thanks for the feedback. Highly appreciated
Thank you for this great course. I am wondering if it is necessary to use Redis here?
It was for the cases I needed it, for example, I had to run Celery workers that were to handle some tasks such as sending emails.
Thank you so much, brother! I started watching the video from zero, the only thing i had was very good basics of Python language. I understood everything in this video and it helped me a lot to progress.
P.S. Do you think it's a good idea to use your project (the currenct one) for intern positions as Backend Python Dev or i should focus on more complicated projects? Thanks in advance! Wish you all the best!
I think the best approach is to get you’re interested in. those projects can be as simple as what you’re interested in like your hobbies and then by building those you’ll have at least some projects that you will be proud of showing and you live in solve problems that you’re having in real life That’s my approach to learn these things but anyway, Thank you so much for watching. I really appreciate.
@@SsaliJonathan Thank you so much for the fast response!
Hi, Ssali Jonathanm. I appreciate your effort. Can you create a time index for each chapter for this video so beginners like me can follow easily?
Hi. RUclips has a bug. Longer videos not time indexed well these days. I have a comment with the chapters if you’re interested
appreciate your work
could u also make couple of tutorial on fastapi websockets
Glad you enjoyed the video. I’m going to release it soon
can you make video on without using orm just fastapi and connection pooling pgbouncer for pgsql
Would be nice to hook this api to a react front end or next js
I get this error when creating the server at 2:09:22. ->
InvalidRequestError: The asyncio extension requires an async driver to be used. The loaded 'psycopg2' is not async.
Anyone else faced this and successfully resolved?
If you have asyncpg installed, try using your database URI as postgresql+asyncpg;//user:passwd@host/db
@@SsaliJonathan Thanks. I was able to make it work with asyncpg with 1 additional modification -> Removing the sslmode query parameter from the DATABASE_URL.
Great tutorial man! I am stuck in the part where you are creating new table named Users. In my case, the alembic is not able to detect the creation of users table. Am I missing something?
Kindly reach out to me on Discord. I will surely help you there. discord.com/invite/yqpwkwjRbx
@@SsaliJonathan
Thanks! FYI, the issue is resolved. Idk what was the issue, when I refreshed the vscode, it was able to detect the change. Maybe my save button wasn’t working lol😁
@@SsaliJonathan
Hey man, I really appreciate the efforts you have put into making this video! I am currently on the part where you setup background task. I have already done that multiple times using celery, so wont take long to understand the concept.
One thing, I just found a bug in the repo. Is there any way I can contribute to the code?
Thanks🙏🏻
what is the extension you used for intelisense for fast api syntax?
I use the Python extension for VSCode.
I couldn't understand exactly how the refresh token and access token mechanism works, especially where should we store the refresh token?
When it expires, what will happen? When user logout also refresh tokeh expires? I have a a lot of question about refresh token lifespan?
Nice Question. You can also add refresh tokens to blacklists if they are expired or not to be used. In a scenario where you find yourself with an expired refresh tokens, you can create a new token pair. It all comes down to the flow of auth you have for your app.
Refresh token lifespans can be as long as you need
This is very interesting but you didn't cover alot in Rest APIs like this fast. Can you create a video on Rest APIs for third party authenticator
Hey, thanks for watching. I am planning on creating these for later updates to this course. I got to the point where the course was getting a lot longer than I expected.
Given that I do most of the work alone, I decided to end it at the length of this. I am planning on adding these topics
@@SsaliJonathan I really appreciate your rest API course but please if you can work on more advanced tutorial even if it's a live would really appreciate 🙏
Hi, could you fix the timestamp? Great work, btw. Thank you.
The timestamps have given me a hard time. But I have now fixed them.
what is the reason you use async??
Async is good for performance reasons. When you use async, you write code that can handle multiple concurrent requests. I’ll make videos in the future explaining this
Please how did you build that documentation can we see the code
Here is the repository that is containing the docs, github.com/jod35/fastapi-beyond-crud-docs
can i use postman?, instead for restfox
The choice of tools is yours. You can even use the Swagger UI that comes with FastAPI
can someone what is the vscode extension i can use for syntax and highlighting for fast api?
Vscode will do the syntax highlighting for Python. In my setup I have the Limey theme, I am also using the Python Vscode extension. There is also Black for code formatting
@SsaliJonathan i wonder, when you typed "status." it shows some intellisense
Thats the Python Vscode extension. marketplace.visualstudio.com/items?itemName=ms-python.python
The timestamps do not work. You need to remove the brackets :). Great effort btw :)
Thanks for the tip! Let me remove them.
Can somebody help me with this? I am not sure why but I am getting this error while running the server, it is according to my research it is after I call init_db() [time: 2hrs:09min in video].
InvalidRequestError: The asyncio extension requires an async driver to be used. The loaded 'psycopg2' is not async.
Try looking at your Postgres URI. You may be providing one that starts with Postgres://. You need to provide one that has postgresql+asyncpg:// . Also make sure you have asyncpg installed. Hope that helps.
@@SsaliJonathan Man... Thank you very much, I just added postgresql+asyncpg:// in the start and it worked like charm. Thanks a lot man. I really appreciate this kind of support.
If you could add chapters that would be very helpfull.
I added the chapters
is this course open to beginners but with previous knowledge in Python?
Yes
@@SsaliJonathan thank you!
hi, could you please make a complete microservice with fastapi for backend bengineer?
Hello, I’ll make a video about that in 2025
@@SsaliJonathan hi, I expect the course to build a real project following industry standards, solving a real-world problem, and applying the latest technologies. I am willing to pay on a subscription basis rather than just a simple CRUD course. What do you think about building a microervice RUclips clone application using fastapi?
How much do you charge for consultancy? I build Python applications mainly in insurance and Healthcare. Nko apa tu Kenya😕
I currently charge $10 an hour. Kindly email me.
how are you running fastapi without uvicorn ?
I’m using the FastAPI CLI. It’s the way to run your app in latest versions of FastAPI
Is it possible to add subtitles to a video?
Yes it is. I have not been successful in creating them for a 12 hour video.
@@SsaliJonathan Suggest segmenting the video and uploading it as a list of videos.😆
why user service has not own folder like book
It’s inside auth.
got stuck at 2 hours as usual ... cant get any answers as this wasnt on windows and he used different database ...
What could be the problem? Do you mind if you can reach out on Discord? I’ll be able to help you from there
discord.com/invite/yqpwkwjRbx
1:12:01
10:41:31
Awesome course bro. Kindly please, could you make a video on Microservies with Django and FastAPI.
Thanks for watching. Kindly noted
11:16:10
Te falto subida de archivos
Puedo trabajar en un video separado para esto. No soy bueno en español. Utilicé Google Translate para esto.
The number of mistakes made during this video is quite impressive...
Yeah. I agree. And that I think makes it one you can easily follow through.
@@SsaliJonathan And for those who dont know redis what are we suppose to do ?
@@jimmyfitzsimmons7170 I try as much as I can to state the errors. Maybe one thing I forgot was to walk them through how to set up Redis
Why am I getting the error : from err
sqlalchemy.orm.exc.UnmappedInstanceError: Class 'src.books.schemas.Book' is not mapped
kindly show me the way you are constructing your models.
No worries, found the issue!
hi jonathan I've a problem, I can't connect my db with fastapi the CLI rerurn me this msg :
"home/b2pic/Desktop/bookly/src/__init__.py:10: RuntimeWarning: coroutine 'initdb' was never awaited
initdb()/" can you or anyone help me to fix it please
Please call initdb with await. like await initdb
@@SsaliJonathan ok I try it, so thanks 👍
Just in case it is hard to go through the timeline,
(00:00:00) Introduction
(00:01:00) Project set up
(00:07:30) Build a simple web server
(00:10:45) Run the server with FastAPI CLI
(00:14:11) Path parameters
(00:17:23) Choosing an HTTP client
(00:20:58) Query Parameters
(00:24:40) Using Path and Query parameters
(00:26:51) Optional Query parameters
(00:31:48) Request Body
(00:39:11) Reading and setting headers
(00:49:43) Build a REST API on a Python List
(01:23:37) Organizing API Paths with Routers
(01:38:22) Databases With SQLModel
(01:42:33) Setting up a database
(01:44:13) Settings management with Pydantic settings
(01:53:38) Async SQLModel set up
(01:58:38) Database connection with lifespan events
(02:10:02) Creating a database model with SQLModel
(02:20:00) Creating database tables
(02:27:08) CRUD With SQLModel
(02:29:48) Separate CRUD logic using service classes
(02:55:53) Intro to Dependency Injection
(03:01:20) Use service methods in API path handlers
(03:33:35) Create the user auth model
(03:42:09) Database Migrations With Alembic
(03:59:57) User Account Creation
(04:18:55) Password hashing with passlib
(04:25:42) User Account Creation endpoint
(04:42:57) Intro to JWT Authentication
(04:48:29) PyJWT Set Up
(05:01:13) User Login Endpoint
(05:13:59) HTTP Bearer Authentication
(05:33:14) Regaining Access with refresh tokens
(05:50:04) Revoking Tokens using Redis
(06:07:39) Role-Based Access Control
(06:09:45) Get the currently authenticated user
(06:20:25) Adding roles to the user model
(06:26:55) Creating the Role Checker dependency
(06:39:24) Handling Model And Schema Relationships
(07:05:53) More Model And Schema Relationships
(07:59:58) Error Handling
(08:04:06) Create custom API Exceptions
(08:18:14) Creating exception handlers for those exceptions
(08:23:26) Register Error handlers on the app
(08:33:25) Intro to Middleware
(08:36:54) Creating a custom logging middleware
(08:53:28) Another middleware example
(08:59:36) Using Custom ASGI middleware with FastAPI
(09:00:21) Adding CORS Middleware
(09:03:34) Adding Trusted Hosts
(09:05:04) Adding Email support
(09:06:39) Setting Up FastAPI-Mail
(09:21:46) Sending your first email
(09:31:21) User account verification
(10:07:51) Password Resets
(10:40:38) Background Tasks
(10:43:00) FastAPI Background Tasks
(10:45:44) Background Tasks with Celery and Redis
(11:16:17) Celery Monitoring With Flower
(11:23:48) API Documentation with SwaggerUI And Redoc
(11:36:02) API Testing
(11:37:10) Unit testing with Unittest Mock And Pytest
(12:01:27) Document-driven Testing with Schemathesis
(12:09:17) Deployment On Render.com
1:03:34
1:42:27
4:05:43
12:32:52
7:05:53
8:01:55