Registry / http-networking / beaapi

beaapi

JSON →
library0.2.0pypypi✓ verified 80d ago

A Python wrapper for the U.S. Bureau of Economic Analysis (BEA) API. Version 0.2.0 provides programmatic access to BEA data such as GDP and regional statistics. Released periodically; currently in early active development.

pip install beaapi
INSTALL
IMPORT
SIG · BEAAPI
B
beaapi
http-networkingpythonv0.2.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BEAAPIError
from beaapi import BEAAPIError
from beaapi import BEAAPI
api_request
from beaapi import api_request
from beaapi import BEAAPI
get_data
from beaapi import get_data
from beaapi import BEAAPI

Initialize BEAAPI with an API key and make a sample request to list datasets.

from beaapi import BEAAPI import os api_key = os.environ.get('BEA_API_KEY', '') if not api_key: raise ValueError("Set BEA_API_KEY environment variable") bea = BEAAPI(api_key) params = { 'UserID': api_key, 'Method': 'GetDataSetList', 'ResultFormat': 'JSON' } response = bea.get_data(params) print(response)
Debug
Known issues
breakingThe API key must be provided as a parameter to the BEAAPI constructor; there is no environment variable autoloading.
fix
Always pass the API key explicitly: BEAAPI(api_key) or set an environment variable and load it manually.
affects: <0.2.0
gotchaThe get_data method expects a flat dictionary of params, not nested. Common mistake: including parameters inside an extra dict.
fix
Pass params as a single dictionary with keys like 'UserID', 'Method', etc.
affects: all
deprecatedThe older pattern BEAAPI().get_data() without explicit API key is deprecated in favor of passing key to constructor.
fix
Switch to BEAAPI(api_key).get_data(params).
affects: <0.2.0
Upgrade
Version history
0.2.0latest on PyPI · released Feb 17, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
26 hits · last 30 days
node
20
Amazon
1
OpenAI (training)
1
Resources
beaapi — pip install beaapi · libregistry