Skip to content

[V5] openbb-bls: Refactor for V5 + Add Many Endpoints#7518

Merged
piiq merged 9 commits into
v5from
feature/v5-bls
Jun 1, 2026
Merged

[V5] openbb-bls: Refactor for V5 + Add Many Endpoints#7518
piiq merged 9 commits into
v5from
feature/v5-bls

Conversation

@deeleeramone

Copy link
Copy Markdown
Contributor

This PR refactors the openbb-bls provider module to V5 standards:

  • Metadata cache built via Hatchling.
  • Publish workflow.
  • 100% test coverage.

Additionally, a significant number of endpoints have been added to provider release coverage for:

  • Employment Situation
  • CPI
  • PPI
  • Productivity & Costs
  • JOLTS
  • Import/Export Prices

Each release provides PDF versions (with historical releases), accompanying tables, supplemental tables, and chart packs where available. The extension comes with five Workspace apps and 100+ widgets. The best way to test this PR is through the UI.

image

An API Key is only required for the BLS Series endpoint, all other data is from XLSX and HTML files.

Coverage

Python commands are obb.bls.<group>.<command>(...); the equivalent REST route
is GET /api/v1/bls/<group>/<command>. Every group also exposes a documents
command listing the release PDFs/files for that program.

Consumer Price Index — bls.cpi

Command Description
t1_expenditure_categoryt7_12m_analysis News Release tables 1–7 (expenditure category, detailed, special aggregates, selected areas, chained vs. CPI-U, 1-month and 12-month analyses)
relative_importance Relative-importance / weights (U.S. city average and selected local areas)
seasonal_factors Revised seasonally-adjusted indexes and seasonal factors
supplemental_tables C-CPI-U, CPI-W, historical CPI-U, and other supplemental XLSX tables
average_prices, by_category, by_category_line, by_metro, by_region News-release chart package

Employment Situation — bls.employment_situation

Command Description
summary_household, summary_establishment Summary Tables A (CPS) and B (CES)
t1_employment_changest7_peak_trough, confidence_intervals CES analytical tables
civilian_unemployment_rate, civilian_unemployment, civilian_employment, employment_population_ratio, labor_force_participation_rate, labor_underutilization, duration_of_unemployment, reasons_for_unemployment, unemployment_by_education, unemployment_by_veteran_status, long_term_unemployed_share, not_in_labor_force_indicators, not_in_labor_force_want_a_job Household-survey (CPS) chart package
employment_levels_by_industry, average_weekly_hours_production, employment_change_by_industry_ci, employment_by_industry_monthly_changes, employment_and_hourly_earnings_by_industry, employment_and_weekly_earnings_by_industry Establishment-survey (CES) chart package

Producer Price Index — bls.ppi

Command Description
detailed_report Monthly Detailed Report tables (XLSX)
relative_importance, seasonal_factors Relative importance and seasonal factors
final_demand_1m / _12m, final_demand_components_1m / _12m, intermediate_processed_1m / _12m, intermediate_services_1m / _12m, intermediate_unprocessed_1m / _12m Final- and intermediate-demand chart package

JOLTS — bls.jolts

Command Description
change_analysis, revisions Over-the-month change analysis and SA/NSA revisions
beveridge_curve, unemp_per_opening, openings_by_industry, hires_seps_rates, openings_hires_seps_levels, openings_hires_seps_rates, openings_hires_seps_by_region Job openings, hires, and separations chart package

Productivity & Costs — bls.productivity

Command Description
tables Long-form major-sector / total-economy productivity datasets
by_sector, nonfarm_business_productivity / _indexes / _labor_costs, manufacturing_productivity / _indexes / _labor_costs, nonfinancial_corporations_indexes Major-sector productivity & costs charts
tfp_output_and_inputs, tfp_combined_inputs_output, tfp_contributions, tfp_percent_change, tfp_ict_trends, tfp_fire_trends Total Factor Productivity
wr_productivity_change / _by_period, wr_1yr_change, wr_longterm_change, wr_indexes_by_sector, wr_labor_cost_by_sector, wr_lp_by_industry Wholesale & Retail Trade productivity
mm_productivity_change / _by_period, mm_1yr_change, mm_longterm_change, mm_indexes_by_industry, mm_labor_cost_by_industry Mining & Manufacturing productivity

Import / Export Price Indexes — bls.import_export

Command Description
price_indexes U.S. import and export price indexes
imports_by_category, exports_by_category, imports_by_origin, exports_by_grains, air_passenger_fares Import/export chart package

Real Earnings — bls.real_earnings

Command Description
documents Real Earnings news-release archive

Search, Series & Calendar

These cross-survey commands fetch live or cached data by series ID:

Command Description
search Search the bundled ~1.1M-series catalog by category, keyword, or code (offline, no API call)
series Fetch one or more time series by symbol from the BLS Public Data API (optional bls_api_key)
calendar BLS data-release schedule

When openbb-economy is installed these register under the Economy survey
namespace (e.g. obb.economy.survey.bls_search(...), and the release calendar as
obb.economy.calendar(provider="bls")); otherwise they are available standalone
as obb.bls.search(...), obb.bls.series(...), and obb.bls.calendar(...).

@deeleeramone deeleeramone mentioned this pull request May 29, 2026
@deeleeramone deeleeramone added enhancement Enhancement refactor Refactor code platform OpenBB Platform extensions Extension-related V5 PRs and issues for ODP V5 labels May 30, 2026
@deeleeramone deeleeramone requested a review from piiq May 30, 2026 18:38

@piiq piiq left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a few notes. non-blocking. thanks for explaining the lazy imports

<td headers="jlt_rc_ophsrates.r.4 jlt_rc_ophsrates.h.1.9"><span class="datavalue">1.3%</span></td>
<td headers="jlt_rc_ophsrates.r.4 jlt_rc_ophsrates.h.1.10"><span class="datavalue">1.2%</span></td>
</tr>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind html fixtures in general, but are 100 empty lines here for a reason?

@@ -0,0 +1,102 @@
"""Hatchling build hook for ``openbb_bls/assets/bls_cache.zip``."""

from __future__ import annotations

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

codex likes to insert from __future__ imports everywhere - is this actually required in this script?

@piiq piiq merged commit 9061473 into v5 Jun 1, 2026
26 checks passed
@piiq piiq deleted the feature/v5-bls branch June 1, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement extensions Extension-related platform OpenBB Platform refactor Refactor code V5 PRs and issues for ODP V5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants