https://psa-tribu2-recursos.herokuapp.com/docs
Directory structure (based on Onion Architecture):
├── main.py
├── app
│ ├── domain
│ │ ├── hours
│ │ │ ├── hours.py # Entity
│ │ │ ├── hours_exception.py # Exception definitions
│ │ │ └── hours_repository.py # Repository interface
│ │ └── resources
│ │ ├── resources.py # Entity
│ │ └── resources_exception.py # Exception definitions
│ ├── infrastructure
│ │ ├── hours
│ │ │ ├── hours_dto.py # DTO using SQLAlchemy
│ │ │ ├── hours_query_service.py # Query service implementation
│ │ │ └── hours_repository.py # Repository implementation
│ │ └── database.py
│ ├── presentation
│ │ └── schema
│ │ ├── hours
│ │ │ └── hours_error_message.py
│ │ └── resources
│ │ └── resources_error_message.py
│ └── usecase
│ ├── hours
│ │ ├── hours_command_model.py # Write models including schemas of the RESTFul API
│ │ ├── hours_command_usecase.py
│ │ ├── hours_query_model.py # Read models including schemas
│ │ ├── hours_query_service.py # Query service interface
│ │ └── hours_query_usecase.py
│ └── resources
│ └── resources_query_model.py # Read models including schemas
└── tests
make run
Access api swagger at: http://127.0.0.1:8000/docs#/
make test
make fmt
make lint
Make sure the api is running
make run
and run the test with
make testBDD