Skip to main content

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_fetch fetch Fetch dataset by API route (e.g. petroleum/pri/spt), with optional frequency, start, end.
enumerate_eia enumerator Enumerate top-level EIA API routes for catalog indexing.

Install

pip install parsimony-eia

Pulls in parsimony-core>=0.4,<0.5 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

import asyncio
from parsimony_eia import CONNECTORS

async def main():
    connectors = CONNECTORS.bind_env()
    result = await connectors["eia_fetch"](route="petroleum/pri/spt", frequency="monthly")
    print(result.data.head())

asyncio.run(main())

For multi-plugin composition:

from parsimony import discover
connectors = discover.load_all().bind_env()

Provider

License

See LICENSE.

Project details


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.4.0.tar.gz (8.3 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.4.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: parsimony_eia-0.4.0.tar.gz
  • Upload date:
  • Size: 8.3 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.4.0.tar.gz
Algorithm Hash digest
SHA256 492d8a05758bb4e37a458958b70cc42f3dca1f60595d875661de3d554cddc036
MD5 1bcb0824eacf36e41bf057df0314ddf4
BLAKE2b-256 246f9f326b35de4135af88c4c999a743cc040d13bebe2a973dc2ca1cea715f6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsimony_eia-0.4.0.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.4.0-py3-none-any.whl.

File metadata

  • Download URL: parsimony_eia-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2252f8f6fa75ed691a57e761d32fa5fb5e49661d407dd9141595ccac060145c0
MD5 a555e1cd7136e9dc249a62613f542dd9
BLAKE2b-256 590153d8e2f767fafaab3f800e275945dcca72cd3285e3197ce873697fbb2f69

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsimony_eia-0.4.0-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.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page