├── .env.example ├── .flake8 ├── .gitignore ├── .pre-commit-config.yaml ├── .pylintrc ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── docker-compose.yaml ├── requirements.txt ├── src ├── __init__.py ├── adapters │ ├── __init__.py │ └── rest_adapter.py ├── app.py ├── database │ └── __init__.py ├── dependency.py ├── domain │ ├── __init__.py │ ├── base │ │ ├── __init__.py │ │ ├── entity.py │ │ ├── event.py │ │ ├── model.py │ │ ├── ports │ │ │ ├── __init__.py │ │ │ └── event_adapter_interface.py │ │ └── value_object.py │ ├── delivery │ │ ├── __init__.py │ │ ├── adapters │ │ │ ├── __init__.py │ │ │ └── cost_calculator_adapter.py │ │ └── ports │ │ │ ├── __init__.py │ │ │ └── cost_calculator_interface.py │ ├── maps │ │ ├── __init__.py │ │ ├── adapters │ │ │ ├── __init__.py │ │ │ └── google_maps_adapter.py │ │ ├── ports │ │ │ ├── __init__.py │ │ │ └── maps_adapter_interface.py │ │ └── value_objects.py │ ├── order │ │ ├── __init__.py │ │ ├── adapters │ │ │ ├── __init__.py │ │ │ └── order_event_publisher_adapter.py │ │ ├── controllers │ │ │ ├── __init__.py │ │ │ └── order_controller.py │ │ ├── entities.py │ │ ├── events.py │ │ ├── exceptions │ │ │ ├── __init__.py │ │ │ └── order_exceptions.py │ │ ├── ports │ │ │ ├── __init__.py │ │ │ ├── order_database_interface.py │ │ │ └── order_service_interface.py │ │ ├── repository │ │ │ ├── __init__.py │ │ │ └── order_repository.py │ │ ├── schemas │ │ │ ├── __init__.py │ │ │ └── order_schemas.py │ │ ├── services │ │ │ ├── __init__.py │ │ │ └── order_service.py │ │ └── value_objects.py │ ├── payment │ │ ├── __init__.py │ │ ├── adapters │ │ │ ├── __init__.py │ │ │ └── paypal_adapter.py │ │ ├── ports │ │ │ ├── __init__.py │ │ │ └── payment_adapter_interface.py │ │ └── value_objects.py │ └── product │ │ ├── __init__.py │ │ ├── adapters │ │ ├── __init__.py │ │ └── product_adapter.py │ │ ├── entities.py │ │ ├── ports │ │ ├── __init__.py │ │ └── product_adapter_interface.py │ │ └── value_objects.py ├── event_handler.py ├── exceptions.py ├── main.py ├── schemas.py └── settings.py └── tests └── __init__.py /.env.example: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.flake8: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/.flake8 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/.gitignore -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.pylintrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/.pylintrc -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/Dockerfile -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/README.md -------------------------------------------------------------------------------- /docker-compose.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/docker-compose.yaml -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/requirements.txt -------------------------------------------------------------------------------- /src/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/adapters/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/adapters/rest_adapter.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/adapters/rest_adapter.py -------------------------------------------------------------------------------- /src/app.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/app.py -------------------------------------------------------------------------------- /src/database/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/database/__init__.py -------------------------------------------------------------------------------- /src/dependency.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/dependency.py -------------------------------------------------------------------------------- /src/domain/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/base/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/base/entity.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/base/entity.py -------------------------------------------------------------------------------- /src/domain/base/event.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/base/event.py -------------------------------------------------------------------------------- /src/domain/base/model.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/base/model.py -------------------------------------------------------------------------------- /src/domain/base/ports/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/base/ports/event_adapter_interface.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/base/ports/event_adapter_interface.py -------------------------------------------------------------------------------- /src/domain/base/value_object.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/base/value_object.py -------------------------------------------------------------------------------- /src/domain/delivery/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/delivery/adapters/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/delivery/adapters/cost_calculator_adapter.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/delivery/adapters/cost_calculator_adapter.py -------------------------------------------------------------------------------- /src/domain/delivery/ports/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/delivery/ports/cost_calculator_interface.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/delivery/ports/cost_calculator_interface.py -------------------------------------------------------------------------------- /src/domain/maps/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/maps/adapters/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/maps/adapters/google_maps_adapter.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/maps/adapters/google_maps_adapter.py -------------------------------------------------------------------------------- /src/domain/maps/ports/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/maps/ports/maps_adapter_interface.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/maps/ports/maps_adapter_interface.py -------------------------------------------------------------------------------- /src/domain/maps/value_objects.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/maps/value_objects.py -------------------------------------------------------------------------------- /src/domain/order/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/order/adapters/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/order/adapters/order_event_publisher_adapter.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/order/adapters/order_event_publisher_adapter.py -------------------------------------------------------------------------------- /src/domain/order/controllers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/order/controllers/order_controller.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/order/controllers/order_controller.py -------------------------------------------------------------------------------- /src/domain/order/entities.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/order/entities.py -------------------------------------------------------------------------------- /src/domain/order/events.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/order/events.py -------------------------------------------------------------------------------- /src/domain/order/exceptions/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/order/exceptions/order_exceptions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/order/exceptions/order_exceptions.py -------------------------------------------------------------------------------- /src/domain/order/ports/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/order/ports/order_database_interface.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/order/ports/order_database_interface.py -------------------------------------------------------------------------------- /src/domain/order/ports/order_service_interface.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/order/ports/order_service_interface.py -------------------------------------------------------------------------------- /src/domain/order/repository/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/order/repository/order_repository.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/order/repository/order_repository.py -------------------------------------------------------------------------------- /src/domain/order/schemas/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/order/schemas/order_schemas.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/order/schemas/order_schemas.py -------------------------------------------------------------------------------- /src/domain/order/services/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/order/services/order_service.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/order/services/order_service.py -------------------------------------------------------------------------------- /src/domain/order/value_objects.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/order/value_objects.py -------------------------------------------------------------------------------- /src/domain/payment/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/payment/adapters/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/payment/adapters/paypal_adapter.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/payment/adapters/paypal_adapter.py -------------------------------------------------------------------------------- /src/domain/payment/ports/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/payment/ports/payment_adapter_interface.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/payment/ports/payment_adapter_interface.py -------------------------------------------------------------------------------- /src/domain/payment/value_objects.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/payment/value_objects.py -------------------------------------------------------------------------------- /src/domain/product/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/product/adapters/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/product/adapters/product_adapter.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/product/adapters/product_adapter.py -------------------------------------------------------------------------------- /src/domain/product/entities.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/product/entities.py -------------------------------------------------------------------------------- /src/domain/product/ports/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/domain/product/ports/product_adapter_interface.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/product/ports/product_adapter_interface.py -------------------------------------------------------------------------------- /src/domain/product/value_objects.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/domain/product/value_objects.py -------------------------------------------------------------------------------- /src/event_handler.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/event_handler.py -------------------------------------------------------------------------------- /src/exceptions.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/exceptions.py -------------------------------------------------------------------------------- /src/main.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/main.py -------------------------------------------------------------------------------- /src/schemas.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/schemas.py -------------------------------------------------------------------------------- /src/settings.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marcosvs98/hexagonal-architecture-with-python/HEAD/src/settings.py -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------------------