You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New interface for injecting config into the main PyOWM entry point.
Requirements
The config dict can be provided either:
as an external file
as a Python dict
The config file are JSON based
Each OWM API (weather API, pollution API, etc..) has its own configuration
section in the global config dict
TODOs
place a default config file into the rooot PyOWM folder. This will collect
info from modules: pyowm.constants, pyowm.webapi25.configuration25, pyowm.webapi25.owm25.OWM25 and from the entry point of package pyowm
take the actual pyowm.webapi25.configuration25.weather_code_registry data structure out
from configuration and put it into a specific module. Also city_id_registry shall not
be instantiated here but by the OWM class
refactor the PyOWM factory system, changing the main library object from OWM25 to OWM (more generic)
create a documentation page about config
have setup.py take the info it needs from the default config file
This is the logic format for the config dict:
GLOBAL
- default language
- default API subscription type
CONNECTION
- use ssl (boolean)
- verify SSL certs (boolean)
- default connection timeout
CITY ID REGISTRY
- pattern of city ID files (es. 'cityids/%03d-%03d.txt.gz')
New interface for injecting config into the main PyOWM entry point.
Requirements
The config dict can be provided either:
The config file are JSON based
Each OWM API (weather API, pollution API, etc..) has its own configuration
section in the global config dict
TODOs
info from modules:
pyowm.constants
,pyowm.webapi25.configuration25
,pyowm.webapi25.owm25.OWM25
and from the entry point of packagepyowm
pyowm.webapi25.configuration25.weather_code_registry
data structure outfrom configuration and put it into a specific module. Also
city_id_registry
shall notbe instantiated here but by the
OWM
classOWM25
toOWM
(more generic)setup.py
take the info it needs from the default config fileThis is the logic format for the config dict:
Example of config load
Something like:
The text was updated successfully, but these errors were encountered: