cleanarch-ioc-pypackage

Clean Architecture IoC Project Base

Table of Contents


Overview

This project implements a clean architecture scaffolding with prototype classes for the following tech stack:

Clean Architecture is a software design pattern that emphasizes the separation of concerns by organizing code into layers with distinct responsibilities. It aims to create systems that are easy to maintain, test, and evolve by keeping the business logic and application rules independent of external frameworks, databases, and user interfaces. The architecture typically includes layers such as Entities, Use Cases, Interface Adapters, and Frameworks and Drivers, each serving a specific purpose. By adhering to these principles, Clean Architecture helps in creating robust, scalable, and adaptable systems.

Dependency injection (DI) is a design pattern used to implement Inversion of Control (IoC) in software development, which helps to decouple the creation of object dependencies from their usage. By injecting dependencies into a class rather than having the class create them itself, DI promotes loose coupling and enhances code modularity. This separation of concerns makes the codebase more maintainable and testable, as it allows for easier swapping of implementations and facilitates unit testing by enabling the use of mock objects.

This project is based on the example from python-dependency-injector and contains a simple user entity with endpoints to manipulate user entity.


Usage

Prerequisites

Initialize project

Initialize project using cookiecutter CLI:

cookiecutter gh:bsantanna/cleanarch-ioc-pypackage

Follow the prompts to fill in the project details.

Initialization inputs


Contact

For questions or feedback, please contact the author via LinkedIn: Bruno Sant’Anna


Acknowledgements


License

This project is licensed under the MIT License. See the LICENSE file for details.