Cache EIA API data
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 148
- Forks
- 55
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 18
Description
Feature Request
Would be nice to add in a config option allowing for the caching of EIA API data. We do have each API call retry up to three times, but its still non-uncommon to run into a ReadTimeoutError, given below. Im not sure if this is caused when multiple API calls happen at one time from different rules.
WARNING:urllib3.connectionpool:Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='api.eia.gov', port=443): Read timed out.
Suggested Solution
Add in a RetrieveEiaApiData rule that will call the API once and save the data in the resources folder. This should make running scenarios a little easier, as the data only has to be requested once.
Additional Info
No response
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing EIA API calls and their retry handling, then trace how scenario rules access the returned data. Implement the requested configuration option and RetrieveEiaApiData rule so one API request saves data in the resources folder and later scenario runs reuse it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend-api-design, data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100