Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Python package to get information regarding the novel corona virus provided by Johns Hopkins university and worldometers.info
Python package to get information regarding the novel corona virus provided by Johns Hopkins university and worldometers.info
Full Documentation can be found here
python >= 3.10
pip install covid
pydantic
requests
covid = Covid()
covid.get_data()
[
{
'country': 'USA',
'confirmed': 311637,
'new_cases': 280,
'deaths': 8454,
'recovered': 14828,
'active': 288355,
'critical': 8206,
'new_deaths': 2,
'total_tests': 1656897,
'total_tests_per_million': Decimal('0'),
'total_cases_per_million': Decimal('941'),
'total_deaths_per_million': Decimal('26')
},
{
'active': 1376,
'confirmed': 81669,
'country': 'China',
'critical': 295,
'deaths': 3329,
'new_cases': 30,
'new_deaths': 3,
'recovered': 76964,
'total_cases_per_million': Decimal('57'),
'total_deaths_per_million': Decimal('2'),
'total_tests': 0,
'total_tests_per_million': Decimal('0')
}
...
]
covid.get_status_by_country_name("italy")
{
'active': 88274,
'confirmed': 124632,
'country': 'Italy',
'critical': 3994,
'deaths': 15362,
'new_cases': 0,
'new_deaths': 0,
'recovered': 20996,
'total_cases_per_million': Decimal('2061'),
'total_deaths_per_million': Decimal('254'),
'total_tests': 657224,
'total_tests_per_million': Decimal('0')
}
countries = covid.list_countries()
[
'china',
'italy',
'usa',
'spain',
'germany',
...
]
active = covid.get_total_active_cases()
confirmed = covid.get_total_confirmed_cases()
recovered = covid.get_total_recovered()
deaths = covid.get_total_deaths()
covid --help
covid
or
covid -s worldometers
covid -s john_hopkins
This comes in handy when you need to know the available names of countries
when using covid -s 'source' -c 'country_name'
, eg. "The Republic of Moldova" or just "Moldova"
So use this when you need to know the country exact name that you can use.
covid -s worldometers --list-countries
covid -s worldometers -c sweden
covid -s worldometers -o active
covid -s worldometers -o confirmed
covid -s worldometers -o recovered
covid -s worldometers -o deaths
from covid import Covid
covid = Covid()
covid.get_data()
[
{
'id': '53',
'country': 'China',
'confirmed': 81020,
'active': 9960,
'deaths': 3217,
'recovered': 67843,
'latitude': 30.5928,
'longitude': 114.3055,
'last_update': 1584097775000
},
{
'id': '115',
'country': 'Italy',
'confirmed': 24747,
'active': 20603,
'deaths': 1809,
'recovered': 2335,
'latitude': 41.8719,
'longitude': 12.5674,
'last_update': 1584318130000
},
...
]
This comes in handy when you need to know the available names of countries
when using get_status_by_country_name
, eg. "The Republic of Moldova" or just "Moldova"
So use this when you need to know the country exact name that you can use.
countries = covid.list_countries()
[
{'id': '53', 'country': 'China'},
{'id': '115', 'country': 'Italy'}
...
]
italy_cases = covid.get_status_by_country_id(115)
{
'id': '115',
'country': 'Italy',
'confirmed': 24747,
'active': 20603,
'deaths': 1809,
'recovered': 2335,
'latitude': 41.8719,
'longitude': 12.5674,
'last_update': 1584318130000
}
italy_cases = covid.get_status_by_country_name("italy")
{
'id': '115',
'country': 'Italy',
'confirmed': 24747,
'active': 20603,
'deaths': 1809,
'recovered': 2335,
'latitude': 41.8719,
'longitude': 12.5674,
'last_update': 1584318130000
}
confirmed = covid.get_total_confirmed_cases()
deaths = covid.get_total_deaths()
FAQs
Python package to get information regarding the novel corona virus provided by Johns Hopkins university and worldometers.info
We found that covid demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.