pyowm package

Subpackages

Submodules

pyowm.config module

pyowm.constants module

pyowm.owm module

class pyowm.owm.OWM(api_key, config=None)[source]

Bases: object

Entry point class providing ad-hoc API clients for each OWM web API.

Parameters:
  • api_key (str) – the OWM API key

  • config (dict) – the configuration dictionary (if not provided, a default one will be used)

agro_manager()[source]

Gives a pyowm.agro10.agro_manager.AgroManager instance that can be used to read/write data from the Agricultural API. :return: a pyowm.agro10.agro_manager.AgroManager instance

airpollution_manager()[source]

Gives a pyowm.airpollutionapi30.airpollution_manager.AirPollutionManager instance that can be used to fetch air pollution data. :return: a pyowm.airpollutionapi30.airpollution_manager.AirPollutionManager instance

alert_manager()[source]

Gives an AlertManager instance that can be used to read/write weather triggers and alerts data. :return: an AlertManager instance

city_id_registry()[source]

Gives the CityIDRegistry singleton instance that can be used to lookup for city IDs.

Returns:

a CityIDRegistry instance

property configuration

Returns the configuration dict for the PyOWM

Returns:

dict

geocoding_manager()[source]

Gives a pyowm.geocoding10.geocoding_manager.GeocodingManager instance that can be used to perform direct and reverse geocoding :return: a pyowm.geocoding10.geocoding_manager.GeocodingManager instance

stations_manager()[source]

Gives a StationsManager instance that can be used to read/write meteostations data. :returns: a StationsManager instance

property supported_languages

Returns the languages that the OWM API supports

Returns:

list of str

tile_manager(layer_name)[source]

Gives a pyowm.tiles.tile_manager.TileManager instance that can be used to fetch tile images. :param layer_name: the layer name for the tiles (values can be looked up on pyowm.tiles.enums.MapLayerEnum) :return: a pyowm.tiles.tile_manager.TileManager instance

uvindex_manager()[source]

Gives a pyowm.uvindexapi30.uvindex_manager.UVIndexManager instance that can be used to fetch UV data. :return: a pyowm.uvindexapi30.uvindex_manager.UVIndexManager instance

property version

Returns the current version of the PyOWM library

Returns:

tuple

weather_manager()[source]

Gives a pyowm.weatherapi30.weather_manager.WeatherManager instance that can be used to fetch air pollution data. :return: a pyowm.weatherapi30.weather_manager.WeatherManager instance

Module contents