csparpa / pyowm

A Python wrapper around the OpenWeatherMap web API
https://pyowm.readthedocs.io
MIT License
789 stars 169 forks source link

How to get current weather with specific measurement units? #436

Open s101d1 opened 2 months ago

s101d1 commented 2 months ago

With pyowm, how to call this current weather API with units parameter (like "metric" or "imperial")?

I checked weather_at_place and weather_at_coords functions, but it seems there is no way to pass the units argument, so the returned data is always using the default "standard" units.


Also, is this a typo? https://github.com/csparpa/pyowm/blob/51d669a3f2de339d053bdc2460bfed7e5b33a083/pyowm/weatherapi25/weather.py#L87

I think the attribute name should be self.wind instead of self.wnd.