Kamaropoulos / COVID19Py

A tiny Python package for easy access to up-to-date Coronavirus (COVID-19, SARS-CoV-2) cases data.
https://pypi.org/project/COVID19Py/
GNU General Public License v3.0
84 stars 57 forks source link

Structural Pattern #146

Closed mattbocc closed 2 years ago

mattbocc commented 3 years ago

I've added the bridge pattern which is a structural pattern to this project. Being able to switch to different method implementations at run time can be useful if scaling up this project. In this scenario the bridge creates a very high-level abstraction without exposing various details. If I added different implementations of the abstract methods these could be used in conjunction with the COVID19 object to give out different output. These would be seamless, just need to call these newly implemented classes and pass the COVID19 object you’ve created.

You can use my test file to see how this would look from a users point of view.