AI-powered learning
Save this course
Clean Architecture in Python
Gain insights into clean architecture using Python. Delve into layered systems, design efficient applications, and integrate web components, error handling, and databases with test-driven development practices.
4.5
50 Lessons
6h 35min
Join 2.9 million developers at
Join 2.9 million developers at
LEARNING OBJECTIVES
- Learn the importance and principles of clean architecture.
- Design and build applications using the principle of layering functional components.
- Understand external connectivity using the Flask Python framework.
- Learn to integrate both structured and unstructured data with Postgres and MongoDB.
Learning Roadmap
1.
Get Started
Get Started
Get familiar with clean architecture principles and their application in Python.
2.
A Day in the Life of a Clean System
A Day in the Life of a Clean System
Solve challenges with data flow, loose coupling, and testability in clean architecture.
3.
Components of Clean Architecture
Components of Clean Architecture
6 Lessons
6 Lessons
Break apart the components of clean architecture to enhance software design, hierarchy, and communication.
4.
A Simple Coding Example
A Simple Coding Example
8 Lessons
8 Lessons
Find out about implementing clean architecture in Python with a room rental project.
5.
Add a Web Application
Add a Web Application
3 Lessons
3 Lessons
Take a closer look at building and testing HTTP endpoints in Flask for web applications.
6.
Error Management
Error Management
9 Lessons
9 Lessons
Implement robust error management, request validation, structured responses, and filtering in Clean Architecture.
7.
Integration with a Real External System Postgres
Integration with a Real External System Postgres
9 Lessons
9 Lessons
Practice using PostgreSQL for repositories, enhancing decoupling, integration tests, and database orchestration.
8.
Integration with a Real External System MongoDB
Integration with a Real External System MongoDB
4 Lessons
4 Lessons
Learn how to use MongoDB integration with Docker, configuration, and testing in clean architecture.
9.
Run a Production-ready System
Run a Production-ready System
5 Lessons
5 Lessons
Walk through setting up a production-ready web system with PostgreSQL, Docker, and Nginx.
Certificate of Completion
Showcase your accomplishment by sharing your certificate of completion.
Complete more lessons to unlock your certificate
Developed by MAANG Engineers
ABOUT THIS COURSE
Clean architecture is a software design methodology that separates the processes of an application into discrete steps instead of presenting them as “spaghetti code.” With the versatility of Python, software engineers can build performant, modular applications quickly using the Flask framework.
This course will help you build better applications using the principles of clean architecture. You’ll start with an introduction to data flow in clean systems and learn about the advantages of layered architectures. Next, you’ll learn system components and the connections between application layers. You’ll then design and build a clean system using Python by layering components in guided coding exercises. Finally, you’ll learn how to add functional components for the web, handle errors, and work with external databases using both Postgres and MongoDB. At each step, you’ll use test-driven development practices to ensure robust functionality.
ABOUT THE AUTHOR
Leonardo Giordani
Leonardo is a software developer, blogger, and author who spent the last 30+ years working with computer as a job and in his free time. He loves to dig deep into topics and to understand technologies thoroughly.
Trusted by 2.9 million developers working at companies
A
Anthony Walker
@_webarchitect_
E
Evan Dunbar
ML Engineer
S
Software Developer
Carlos Matias La Borde
S
Souvik Kundu
Front-end Developer
V
Vinay Krishnaiah
Software Developer
Built for 10x Developers
No Passive Learning
Learn by building with project-based lessons and in-browser code editor


Personalized Roadmaps
The platform adapts to your strengths & skills gaps as you go


Future-proof Your Career
Get hands-on with in-demand skills


AI Code Mentor
Write better code with AI feedback, smart debugging, and "Ask AI"




MAANG+ Interview Prep
AI Mock Interviews simulate every technical loop at top companies


Free Resources