Skip to main content

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 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.raw.head())

For multi-plugin composition:

from parsimony import discover

connectors = discover.load_all()

Provider

License

See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parsimony_eia-0.0.2.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parsimony_eia-0.0.2-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

Details for the file parsimony_eia-0.0.2.tar.gz.

File metadata

  • Download URL: parsimony_eia-0.0.2.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for parsimony_eia-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b1708e164e4676be19f726a6bee9fba64feff282de7b5b3e704198c74e5ff735
MD5 df1072384f5371eb6a89f4e2d0e20c7e
BLAKE2b-256 adc9d0ef3d9d3767e16401ee9cae3f1e750932b07150fc518292b93f5adc1e8b

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsimony_eia-0.0.2.tar.gz:

Publisher: release.yml on ockham-sh/parsimony-connectors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file parsimony_eia-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: parsimony_eia-0.0.2-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

Hashes for parsimony_eia-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 642c3c6a77dde30765148e389f0ff136da013b6df244632ad3c477b25eed69a9
MD5 275afc04f9d4975097d98883afe6bf10
BLAKE2b-256 f2d8ed64579536a730a0ab45e3e43484ed562b80c053bbe385e9ce969e9838e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsimony_eia-0.0.2-py3-none-any.whl:

Publisher: release.yml on ockham-sh/parsimony-connectors

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page