solarforecastarbiter.io.fetch.arm.request_arm_file¶
-
solarforecastarbiter.io.fetch.arm.
request_arm_file
(user_id, api_key, filename, retries=5)[source]¶ Get a file from ARM live in the form of a stream so that the python netCDF4 module can read it.
Parameters: - user_id (string) – ARM user id.
- api_key (string) – ARM live API access token.
- filename (string) – Filename to request
- retries (int) – Number of attempts remaining to successfully request data after ChunkedEncodingError.
Returns: stream – The API response in the form of a stream to be consumed by netCDF4.Dataset().
Raises: request.exceptions.ChunkedEncodingError
– Reraises this error when all retries are exhausted.