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

Covid19 py singleton #125

Closed lotkin98 closed 3 years ago

lotkin98 commented 3 years ago

This is functionally the same as the original only now the singleton pattern is applied. The new meta class ensures that only one instance of COVID19InfoTool class could be made. COVID19InfoTool contains all the methods that where in the original COVID19 class. COVID19InfoTool is instantiated in the COVID19 class which uses the respective COVID19InfoTool methods in its own methods. However, the COVID19InfoTool class is usable by itself.