pyowm package¶
Subpackages¶
- pyowm.abstractions package
- pyowm.agroapi10 package
- pyowm.alertapi30 package
- pyowm.caches package
- pyowm.commons package
- pyowm.exceptions package
- pyowm.pollutionapi30 package
- pyowm.stationsapi30 package
- pyowm.tiles package
- pyowm.utils package
- pyowm.uvindexapi30 package
- pyowm.weatherapi25 package
- Subpackages
- pyowm.weatherapi25.cityids package
- pyowm.weatherapi25.parsers package
- Submodules
- pyowm.weatherapi25.parsers.forecastparser module
- pyowm.weatherapi25.parsers.observationlistparser module
- pyowm.weatherapi25.parsers.observationparser module
- pyowm.weatherapi25.parsers.stationhistoryparser module
- pyowm.weatherapi25.parsers.stationlistparser module
- pyowm.weatherapi25.parsers.stationparser module
- pyowm.weatherapi25.parsers.weatherhistoryparser module
- Module contents
- pyowm.weatherapi25.xsd package
- Submodules
- pyowm.weatherapi25.cityidregistry module
- pyowm.weatherapi25.configuration25 module
- pyowm.weatherapi25.forecast module
- pyowm.weatherapi25.forecaster module
- pyowm.weatherapi25.historian module
- pyowm.weatherapi25.location module
- pyowm.weatherapi25.observation module
- pyowm.weatherapi25.owm25 module
- pyowm.weatherapi25.station module
- pyowm.weatherapi25.stationhistory module
- pyowm.weatherapi25.weather module
- pyowm.weatherapi25.weathercoderegistry module
- Module contents
- Subpackages
Submodules¶
pyowm.constants module¶
Constants for the PyOWM library
Module contents¶
The PyOWM init file
Author: Claudio Sparpaglione, @csparpa <csparpa@gmail.com>
Platform: platform independent
-
pyowm.
OWM
(API_key='b1b15e88fa797225412429c1c50c122a', version='2.5', config_module=None, language=None, subscription_type=None, use_ssl=None)[source]¶ A parametrized factory method returning a global OWM instance that represents the desired OWM Weather API version (or the currently supported one if no version number is specified)
Parameters: - API_key (str) – the OWM Weather API key (defaults to a test value)
- version (str) – the OWM Weather API version. Defaults to
None
, which means use the latest web API version - config_module (str (eg: 'mypackage.mysubpackage.myconfigmodule')) – the Python path of the configuration module you want
to provide for instantiating the library. Defaults to
None
, which means use the default configuration values for the web API version support you are currently requesting. Please be aware that malformed user-defined configuration modules can lead to unwanted behaviour! - language (str) – the language in which you want text results to be returned.
It’s a two-characters string, eg: “en”, “ru”, “it”. Defaults to:
None
, which means use the default language. - subscription_type (str) – the type of OWM Weather API subscription to be wrapped. Can be ‘free’ (free subscription) or ‘pro’ (paid subscription), Defaults to: ‘free’
- use_ssl (bool) – whether API calls should be made via SSL or not. Defaults to: False
Returns: an instance of a proper OWM subclass
Raises: ValueError when unsupported OWM API versions are provided