0

I am currently using couple of classes in Python to connect to the API, process the information provided and put it in the database. Now, I need to do the same thing but for different API. In both cases I am dealing with the same data(apples and apples), however second API uses different requests(potential change in requests class), data is still in the JSON format but is organized a bit differently, e.g.: different field names or some extra fields. Also, the target database will be different but tables inside will look the same as in the first one.

Is there any design patter I should consider to somehow make it easier in the future to maintain and extend the code of those two classes in the future? I was thinking about Template Method design patter, however it could also be an option to keep the things totally separate.

Szymskiii
  • 1
  • 1

0 Answers0