SetUp
- Python 3.9+
- Requirements
pip install -r requirements.txt
- Env variables
Example
SENDER_EMAIL='test@gmail.com'
SENDER_PASSWORD='Gas@35Ff'
SMTP_SERVER='smtp.gmail.com'
SMTP_PORT=465
How it work?
The package is written according to DDD
principles and Strategy
pattern.
To add your own service for sending notifications, need:
- create a new domain in
src
- implement entity, inheriting from
NotificationBase
- implement dto notification
- implement the logic in the use case, inheriting from
BaseUseCase
Scheme:
Controller
-> Entity
(DTO
) -> UseCase
The controller
can be dynamic (if you define the desired entity from the slug)