Closed fwitte closed 2 weeks ago
It looks like the requests_cache
library deliberately normalises orders of headers to improve cache ratios. Maybe this also applies to URL parameters, but I am not sure about this.
I am afraid there is no easy solution for it. You can build a workaround and a param "cache_buster": md5(measurement_names)
.
Works perfectly, thank you very much:
from hashlib import md5
import pickle
params = {
# ....
"cache_buster": md5(pickle.dumps(measurement_names))
}
Maybe worth adding at the end of the variables section in the README? I can open a PR, if you'd like :)
Have a nice weekend
It is a bit of an edge case. I would not add it to the general documentation.
Hi,
if I pass a list of measurements to the API the order of variables changes to a specific order. I.e. if I pass
['wind_speed_10m', 'direct_normal_irradiance', 'temperature_2m']
and want to process the response, e.g. in apandas.DataFrame
I get the actual data in a different order if I change the order and call the function again within the cache time.Is there a way to adjust the order? Thank you very much!
Best
Francesco