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

Update covid19.py on Singleton #139

Closed chenj233 closed 3 years ago

chenj233 commented 3 years ago

I added a Singleton Class that contains multi-threading lock and a unique instance called _sourceInstance. It's a dictionary that basically stores all the data source providers and their urls. In my opinion, this change can make it easier to know whether the data source is valid or not. Hope this helps you!