I'm writing a Python project that will be a serverless with 3 handlers:
- Get partner contacts;
- Get partner deals;
- Get partner flows;
Each handler will be based on date range and for each line retrieved on partner calls, it will save into database.
The macro flow would be something like:
-> partner
begin execution -> handler -> service -> end execution
-> databse
Based on that, I have created the following structure:
|my-project
serverless.yaml
|src
|handlers (similar to controllers)
|services
|infrastructure
|database
|partner
|test
|handlers (similar to controllers)
|services
|infrastructure
|database
|partner
Does it make sense? And about the partner functions? It's a single partner, should I create a single partner class with those functions or should I create a single python class for each function?
I see a problem creating a single file because every call needs to create a client - it's something like client = Partner(user, token).
I want to make this project looks great but I don't want to write every single stuff that we have on OOP.