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

Uploaded Python 3

File details

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

File metadata

  • Download URL: parsimony_eia-0.5.0.tar.gz
  • Upload date:
  • Size: 8.5 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.5.0.tar.gz
Algorithm Hash digest
SHA256 7d471d771e675b3ba4a1a78a57a0a3b40d7eb640262069902d5672addf9c31c0
MD5 e7119020ca220eb8474461969cad1ec1
BLAKE2b-256 6576699b3f128efeef05c96cb9904b0ec2e46ae171348b010c1df6b400f5d5d0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: parsimony_eia-0.5.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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c4a13d16a01b2756b0e6fa9de5254a5bec7a0564f0d56952905cd31f13970eac
MD5 f8e492eb9afac1156700aebc03c828cb
BLAKE2b-256 48f85fa5128725a349a6039d3a8b142662900a4acd5920909d5d741ae2197943

See more details on using hashes here.

Provenance

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