Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
yweather is a Python module that provides an interface to the Yahoo! Weather RSS feed <http://developer.yahoo.com/weather/>
_.
.. code:: python
>>> client.fetch_woeid("Paris, France")
'615702'
>>> client.fetch_woeid("Seattle, Washington")
'2490383'
Location and weather data is not limited to a single country. Fetch data for any location that is available on Yahoo! Weather.
Different countries use different measurement systems (unfortunately). Fetch data according to United States customary units or the metric system.
.. code:: python
>>> paris_weather = client.fetch_weather("615702", metric=True)
>>> seattle_weather = client.fetch_weather("2490383", metric=False)
.. code:: python
>>> norfolk_weather = client.fetch_weather("2460389")
>>> norfolk_weather["astronomy"]["sunrise"]
'7:18 am'
>>> norfolk_weather["condition"]["text"]
'Partly Cloudy'
Weather data is returned as a Python dict
, not as an object of a confusing class.
Unlike many weather APIs, Yahoo! Weather's RSS feed doesn't require sign ups, API keys, or special authorization to fetch and use their data. All you have to do is follow their Terms of Use <http://developer.yahoo.com/weather/#terms>
_.
.. code:: python
>>> client.fetch_woeid("Raleigh, North Carolina")
'2478307'
>>> client.fetch_lid("2379574")
'USIL0228'
yweather doesn't assume you know location identifiers off the top of your head. You can call the fetch_woeid
or fetch_lid
methods to lookup a location's WOEID or LID. WOEID is Yahoo! Weather's location identifier. LID is The Weather Channel's location identifier.
.. code:: python
>>> london_weather = client.fetch_weather("UKXX0085")
>>> len(london_weather["forecast"])
5
By using a The Weather Channel Location ID (LID), you can fetch a location's 5-day weather forecast. A little warning though -- it's using an undocumented API. If you aren't up for it, you can still get the 2-day forecast using a WOEID.
yweather includes complete and easy-to-read documentation <https://yweather.readthedocs.org/>
_. Check it out for a gentle introduction or the full API details.
yweather uses its GitHub Issues page <https://github.com/tsroten/yweather/issues>
_ to track bugs, feature requests, and support questions.
yweather is released under the OSI-approved MIT License <http://opensource.org/licenses/MIT>
_. See the file LICENSE.txt for more information.
FAQs
a Python module that provides an interface to the Yahoo! Weather RSS feed.
We found that yweather 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
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.