Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
Python wrapper for getting weather data from AccuWeather API.
To generate API key go to https://developer.accuweather.com/user/register and after registration create an app.
"""Example of usage."""
import asyncio
import logging
from aiohttp import ClientError, ClientSession
from accuweather import (
AccuWeather,
ApiError,
InvalidApiKeyError,
InvalidCoordinatesError,
RequestsExceededError,
)
LATITUDE = 52.0677904
LONGITUDE = 19.4795644
API_KEY = "xxxxx"
logging.basicConfig(level=logging.DEBUG)
async def main():
"""Run main function."""
async with ClientSession() as websession:
try:
accuweather = AccuWeather(
API_KEY,
websession,
latitude=LATITUDE,
longitude=LONGITUDE,
language="pl",
)
current_conditions = await accuweather.async_get_current_conditions()
forecast_daily = await accuweather.async_get_daily_forecast(
days=5, metric=True
)
forecast_hourly = await accuweather.async_get_hourly_forecast(
hours=12, metric=True
)
except (
ApiError,
InvalidApiKeyError,
InvalidCoordinatesError,
ClientError,
RequestsExceededError,
) as error:
print(f"Error: {error}")
else:
print(f"Location: {accuweather.location_name} ({accuweather.location_key})")
print(f"Requests remaining: {accuweather.requests_remaining}")
print(f"Current: {current_conditions}")
print(f"Forecast: {forecast_daily}")
print(f"Forecast hourly: {forecast_hourly}")
loop = asyncio.new_event_loop()
loop.run_until_complete(main())
loop.close()
FAQs
Python wrapper for getting weather data from AccuWeather API.
We found that accuweather 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.