Option to return 'None' instead of KeyError
Closed this issue · 0 comments
mfjackson commented
In reference to PR #40 , I think it would be useful to add an option to return 'None' instead of raising a KeyError when dealing with weather attributes that don't have data associated with them.
I'm using Dark Sky's API for historical data collection, so raising a KeyError doesn't allow me to generate a full dataset without writing a try-except to ignore the PropertyUnavailable
exception. I know that there's a focus on keeping load_forecast()
pretty simple and not bogging it down with tons of parameters, but this could be a nice one to add for those using the package for historical data purposes.
I'd be happy to write it and submit a PR if there's interest or perceived use-value.