
Research
Malicious npm Package Brand-Squats TanStack to Exfiltrate Environment Variables
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.
weather-api-wrapper
Advanced tools
A Python wrapper for the OpenWeatherMap API, enabling easy access to weather data for any location.
You can install the Weather API Wrapper using pip:
pip install weather-api-wrapper
from weather_api_wrapper import WeatherClient
# Initialize the WeatherClient with your OpenWeatherMap API key
client = WeatherClient(api_key='your_api_key')
# Get current weather for a specific city
current_weather = client.get_current_weather(city='London')
# Get weather forecast for a specific city
forecast = client.get_weather_forecast(city='New York')
# Get historical weather data for a specific city and date range
historical_data = client.get_historical_weather(city={'lat': 51.51, 'lon': -0.13}, start_date='2024-04-01', end_date='2024-04-07')
# Get air pollution data for a specific city
air_pollution = client.get_air_pollution(city={'lat': 51.51, 'lon': -0.13})
# Get UV index data for a specific city
uv_index = client.get_uv_index(city={'lat': 51.51, 'lon': -0.13})
# Get weather alerts for a specific city
weather_alerts = client.get_weather_alerts(city='New York')
Replace your_api_key with your actual OpenWeatherMap API key.
You can also use the command-line interface to retrieve weather data:
weather-cli --api-key your_api_key London
Replace 'your_api_key' with your actual OpenWeatherMap API key and 'London' with the city for which you want to retrieve weather data.
The CLI supports the following commands:
weather-cli: Fetches current weather data for a specified city.weather-cli --api-key your_api_key --forecast London: Fetches weather forecast data for a specified city.weather-cli --api-key your_api_key --historical London --start-date 2024-04-01 --end-date 2024-04-07: Fetches historical weather data for a specified city and date range.weather-cli --api-key your_api_key --pollution London: Fetches air pollution data for a specified city.weather-cli --api-key your_api_key --uv London: Fetches UV index data for a specified city.weather-cli --api-key your_api_key --alerts London: Fetches weather alerts for a specified city.For detailed usage instructions and API documentation, please refer to the documentation.
Contributions are welcome! If you have any suggestions, feature requests, or bug reports, please open an issue on GitHub. See the Code of conduct for more details.
This project is licensed under the MIT License. See the LICENSE file for details.
FAQs
A Python wrapper for the OpenWeatherMap API
We found that weather-api-wrapper 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.

Research
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.

Research
Compromised SAP CAP npm packages download and execute unverified binaries, creating urgent supply chain risk for affected developers and CI/CD environments.

Company News
Socket has acquired Secure Annex to expand extension security across browsers, IDEs, and AI tools.