Yr-weather

Latest version: v0.4.0

Safety actively analyzes 685525 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.4.0

py
land_overview = my_client.get_forecasts("landoverview")

forecast_now = land_overview.now()

Not really that useful to get the first location, so why not get a specific one?
forecast_east = forecast_now.locations.get("Østlandet")

if forecast_east:
print(f"The forecast for Østlandet is: {forecast_east.text}")
else:
print("Sorry, couldn't get the forecast for Østlandet!")

Not sure which locations are available in the forecast you received? Use TextForecastLocations.names
locations = forecast_now.locations.names

print(f"Available locations are {', '.join(locations)}")


**See other examples in the [docs](https://yr-weather.readthedocs.io/en/latest/textforecast/examples.html)**

Radar, Sunrise and Geosatellige
These MET API products have also received improvements when using `yr-weather`.
For details, check the examples in the [documentation](https://yr-weather.readthedocs.io/en/latest/index.html) for the respective product.

Other changes
- The project status has developed: **alpha** -> **beta**
- Testing using pytest added
- Added support for mypy

---

Available on [PyPi](https://pypi.org/project/yr-weather/).

**Full Changelog**: https://github.com/ZeroWave022/yr-weather/compare/v0.3.0...v0.4.0

0.3.0

Changelog
- Support for [Geosatellite](https://api.met.no/weatherapi/geosatellite/1.4/documentation) (v1.4)
- Even better docs
- License changed to Apache 2.0

Available on [PyPi](https://pypi.org/project/yr-weather/).

All commits: https://github.com/ZeroWave022/yr-weather/compare/v0.2.0...v0.3.0

0.2.0

Changelog
- Added [Read the Docs documentation](https://yr-weather.readthedocs.io/)
- Rewritten docstrings in reStructuredText
- Added support for Sunrise (v2.0)
- Some less significant code refactoring

Available on [PyPi](https://pypi.org/project/yr-weather/).

All commits: https://github.com/ZeroWave022/yr-weather/compare/v0.1.1...v0.2.0

0.1.1

Changelog
- Textforecast: It's possible to get areas (their polygons, names, etc.)
- Some warnings added, in case XML can't be parsed
- Typing files moved to own module

Available on [PyPI](https://pypi.org/project/yr-weather).

0.1.0

First release of yr-weather.
The project is still in early Alpha. Feedback and contributions are greatly appreciated!

Added support for products:
- Locationforecast (v2.0)
- Radar (v2.0)
- Textforecast (v2.0)

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.