ExpDev07 / coronavirus-tracker-api

🦠 A simple and fast (< 200ms) API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak. It's written in python using the 🔥 FastAPI framework. Supports multiple sources!
https://coronavirus-tracker-api.herokuapp.com
GNU General Public License v3.0
1.59k stars 323 forks source link

Creational Pattern Design ( 1 ) #441

Closed Billa32 closed 3 years ago

Billa32 commented 3 years ago

Why I did it? I have used the factory design pattern to do my creational pattern where i had to provide an interface for creating objects in superclass, but allowing subclasses to alter the type of objects that will be created. How i did it? I created a new interface class for location to implement creational pattern and the interface for location class is missing so i just added an interface class and serialized the location into a dict.