U.S. Energy Information Administration connector for the parsimony framework
Project description
parsimony-eia
U.S. Energy Information Administration (EIA) connector — fetches energy data (petroleum, electricity, natural gas, coal, renewables) from the EIA v2 Open Data API.
Part of the parsimony-connectors monorepo. Distributed standalone on PyPI as parsimony-eia.
Connectors
| Name | Kind | Description |
|---|---|---|
eia_search |
tool | Semantic-search the dataset catalog; returns a dataset route to pass to eia_fetch. |
eia_fetch |
fetch | Fetch a dataset by route (e.g. petroleum/pri/spt) with optional measure, facets, frequency, start, end. Paged in full. |
eia_fetch_series |
fetch | Fetch by a legacy APIv1 series id (e.g. PET.RWTC.D) via the /v2/seriesid/{id} path. |
eia_facets |
tool | List the valid {id, name} values of a dataset's facet dimension, to narrow a fetch to a series. |
enumerate_eia |
enumerator | Walk the v2 route tree to one row per leaf dataset (the catalog feed). |
Coverage
The catalog indexes all 232 leaf datasets across EIA's 14 top-level
categories (petroleum, natural gas, electricity, coal, nuclear, renewables/
densified-biomass, total energy, emissions, international, SEDS, STEO, AEO, IEO,
crude-oil imports), each carrying its measure and facet-dimension manifest. EIA's
full series universe (~2M series) is the facet cartesian product of those
datasets — too large to catalog individually, but every series is fetchable:
by route + facets filters, or by its legacy series id via eia_fetch_series.
So discovery is at the dataset tier and access is total.
EIA caps every data response at 5,000 rows; the fetch connectors page through to completeness automatically (a request matching more than 300,000 rows is refused with guidance to narrow it). Data is U.S. federal public domain — cite as "Source: U.S. Energy Information Administration".
Install
pip install parsimony-eia
Pulls in a compatible parsimony-core automatically. Verify discovery:
python -c "from parsimony import discover; print([p.name for p in discover.iter_providers()])"
Configuration
Set the following environment variable:
export EIA_API_KEY="<your-key>"
Get a free key at https://www.eia.gov/opendata/register.php.
Quick start
from parsimony_eia import CONNECTORS
result = CONNECTORS["eia_fetch"](route="petroleum/pri/spt", frequency="monthly")
print(result.data.head())
For multi-plugin composition:
from parsimony import discover
connectors = discover.load_all()
Provider
- Homepage: https://www.eia.gov
- API docs: https://www.eia.gov/opendata/documentation.php
License
See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file parsimony_eia-0.0.1.tar.gz.
File metadata
- Download URL: parsimony_eia-0.0.1.tar.gz
- Upload date:
- Size: 18.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d268f22e1f1dd331c8642da208abacf65c96a3357a4f5408c60a4e959e693617
|
|
| MD5 |
e7b2ee9d7f13c53c98fd55291f1fab84
|
|
| BLAKE2b-256 |
2cb8793e5a6c546127addc7bcf680162f5f1ca6f46d1e3c6ae09640e95410fe7
|
Provenance
The following attestation bundles were made for parsimony_eia-0.0.1.tar.gz:
Publisher:
release.yml on ockham-sh/parsimony-connectors
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
parsimony_eia-0.0.1.tar.gz -
Subject digest:
d268f22e1f1dd331c8642da208abacf65c96a3357a4f5408c60a4e959e693617 - Sigstore transparency entry: 1971011057
- Sigstore integration time:
-
Permalink:
ockham-sh/parsimony-connectors@517cb5874f97ffede7738611ed75bb3ed27e26a0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ockham-sh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@517cb5874f97ffede7738611ed75bb3ed27e26a0 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file parsimony_eia-0.0.1-py3-none-any.whl.
File metadata
- Download URL: parsimony_eia-0.0.1-py3-none-any.whl
- Upload date:
- Size: 21.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47fe2044ba060e057457d2dea64ca32d0a78da519935c7707e69465dd273b15d
|
|
| MD5 |
21900b5a190952eb829d26ffba5482b5
|
|
| BLAKE2b-256 |
595cf477821db0e9b769e65639ebad8133d751220ef5f62d6951c59356ebdbe5
|
Provenance
The following attestation bundles were made for parsimony_eia-0.0.1-py3-none-any.whl:
Publisher:
release.yml on ockham-sh/parsimony-connectors
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
parsimony_eia-0.0.1-py3-none-any.whl -
Subject digest:
47fe2044ba060e057457d2dea64ca32d0a78da519935c7707e69465dd273b15d - Sigstore transparency entry: 1971011114
- Sigstore integration time:
-
Permalink:
ockham-sh/parsimony-connectors@517cb5874f97ffede7738611ed75bb3ed27e26a0 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ockham-sh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@517cb5874f97ffede7738611ed75bb3ed27e26a0 -
Trigger Event:
workflow_dispatch
-
Statement type: