Registry / analytics / openbb-government-us

openbb-government-us

JSON →
library1.6.1pypypi✓ verified 83d ago

OpenBB Government US extension providing US government data providers within the OpenBB platform. Current version 1.6.1, weekly releases alongside OpenBB SDK.

pip install openbb-government-us
INSTALL
IMPORT
SIG · OPENBB-GOVERNMENT-
O
openbb-government-us
analyticspythonv1.6.1
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.

OBB
from openbb import obb
Standard OpenBB import; extension loads automatically when installed.

Fetch government economic data (GDP forecast) using the OECD provider. Replace 'oecd' with 'fiscal_spending' or other available providers.

from openbb import obb df = obb.economy.gdp_forecast(provider='oecd').to_dataframe() print(df.head())
Debug
Known issues
breakingOpenBB v4.0 changed the import path. Previously 'from openbb_terminal.sdk import openbb', now 'from openbb import obb'.
fix
Use 'from openbb import obb' and upgrade your code.
affects: >=4.0.0
gotchaThis extension is not standalone; it requires the base openbb package. Installing only openbb-government-us will not work without openbb.
fix
Install with 'pip install openbb[all]' or ensure openbb is installed.
affects: all
gotchaSome providers require an API key. For example, 'fiscal_spending' needs a FRED API key. Missing keys cause a 'ProviderError'.
fix
Set environment variable 'FRED_API_KEY' or use obb.account.login(pat='your_fred_key') (OpenBB v4+).
affects: all
Errors
Common errors & fixes
openbb==3.x error: 'openbb_terminal' has no attribute 'government'
OpenBB v3.x needed the extension explicitly imported, or it wasn't installed.
fix
Upgrade to openbb>=4.0.0 and use 'from openbb import obb'. Ensure openbb-government-us is installed.
ModuleNotFoundError: No module named 'openbb_government_us'
Package not installed or wrong Python environment.
fix
Run 'pip install openbb-government-us' and verify with 'pip list | grep openbb'.
ProviderError: The api_key is required for provider: fred
Missing FRED API key for some government endpoints.
fix
Set environment variable 'FRED_API_KEY' to your key, or use obb.economy.gdp(provider='oecd') instead.
Upgrade
Version history
1.6.1latest on PyPI · released May 26, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
33 hits · last 30 days
node
30
Amazon
1
OpenAI (training)
1
Resources

No resource links recorded.

openbb-government-us — pip install openbb-government-us · libregistry