Package: bls-api
BLS_API PACKAGEIntroduction:- This package is design to get aggregated data from Bureau Labor of Statistics
rather than specifying the Series Id.
- The package already have the series scraped and defined.Installation:Pip:You can use pip to install this packagepipinstallbls_apiUsage:Labor Force data:Let's first interact with Labor Force data in BLSfrombls_apiimportlabor_force### Initiate the instanceinstance=labor_force()### if you have the token from BLS you can set it up if not it is not the problem.instance.token="<Your Token>""""Let's assume we have 2 series LAUMT531338000000006 and LAUMT531338000000005We want to get data from these 2 series.These series belongs to labor_force_participation_dataLet's these 2 series to the instance"""custom_series=instance.add_custom_series(["LAUMT531338000000006","LAUMT531338000000005"])### add_custom_series returns a series_object class### Now we can set the _from and _to to this object classcustom_series._from=2017custom_series._to=2018### now we can loop through the custom series to get the data:### This will return 3 types series_data, catalog, and data typeforseries_data,catalog,type_incustom_series:print(series_data)print(catalog)print(type_)"""Output{'year': '2019', 'period': 'M12', 'value': '118566', 'periodName': 'December'}{'series_id': 'LAUMT531338000000006', 'series_title': 'Labor Force: Bellingham, WA Metropolitan Statistical Area (U)', 'seasonality': 'Not Seasonally Adjusted', 'survey_name': 'Local Area Unemployment Statistics', 'survey_abbreviation': 'LA', 'measure_data_type': 'labor force', 'area': 'Bellingham, WA Metropolitan Statistical Area', 'area_type': 'Metropolitan areas'}{'data_type': None}{'year': '2019', 'period': 'M11', 'value': '118456', 'periodName': 'November'}{'series_id': 'LAUMT531338000000006', 'series_title': 'Labor Force: Bellingham, WA Metropolitan Statistical Area (U)', 'seasonality': 'Not Seasonally Adjusted', 'survey_name': 'Local Area Unemployment Statistics', 'survey_abbreviation': 'LA', 'measure_data_type': 'labor force', 'area': 'Bellingham, WA Metropolitan Statistical Area', 'area_type': 'Metropolitan areas'}{'data_type': None}{'year': '2019', 'period': 'M10', 'value': '117918', 'periodName': 'October'}{'series_id': 'LAUMT531338000000006', 'series_title': 'Labor Force: Bellingham, WA Metropolitan Statistical Area (U)', 'seasonality': 'Not Seasonally Adjusted', 'survey_name': 'Local Area Unemployment Statistics', 'survey_abbreviation': 'LA', 'measure_data_type': 'labor force', 'area': 'Bellingham, WA Metropolitan Statistical Area', 'area_type': 'Metropolitan areas'}{'data_type': None}{'year': '2019', 'period': 'M09', 'value': '115242', 'periodName': 'September'}{'series_id': 'LAUMT531338000000006', 'series_title': 'Labor Force: Bellingham, WA Metropolitan Statistical Area (U)', 'seasonality': 'Not Seasonally Adjusted', 'survey_name': 'Local Area Unemployment Statistics', 'survey_abbreviation': 'LA', 'measure_data_type': 'labor force', 'area': 'Bellingham, WA Metropolitan Statistical Area', 'area_type': 'Metropolitan areas'}{'data_type': None}{'year': '2019', 'period': 'M08', 'value': '115526', 'periodName': 'August'}{'series_id': 'LAUMT531338000000006', 'series_title': 'Labor Force: Bellingham, WA Metropolitan Statistical Area (U)', 'seasonality': 'Not Seasonally Adjusted', 'survey_name': 'Local Area Unemployment Statistics', 'survey_abbreviation': 'LA', 'measure_data_type': 'labor force', 'area': 'Bellingham, WA Metropolitan Statistical Area', 'area_type': 'Metropolitan areas'}{'data_type': None}{'year': '2019', 'period': 'M07', 'value': '116541', 'periodName': 'July'}{'series_id': 'LAUMT531338000000006', 'series_title': 'Labor Force: Bellingham, WA Metropolitan Statistical Area (U)', 'seasonality': 'Not Seasonally Adjusted', 'survey_name': 'Local Area Unemployment Statistics', 'survey_abbreviation': 'LA', 'measure_data_type': 'labor force', 'area': 'Bellingham, WA Metropolitan Statistical Area', 'area_type': 'Metropolitan areas'}{'data_type': None}{'year': '2019', 'period': 'M06', 'value': '116374', 'periodName': 'June'}{'series_id': 'LAUMT531338000000006', 'series_title': 'Labor Force: Bellingham, WA Metropolitan Statistical Area (U)', 'seasonality': 'Not Seasonally Adjusted', 'survey_name': 'Local Area Unemployment Statistics', 'survey_abbreviation': 'LA', 'measure_data_type': 'labor force', 'area': 'Bellingham, WA Metropolitan Statistical Area', 'area_type': 'Metropolitan areas'}{'data_type': None}{'year': '2019', 'period': 'M05', 'value': '115558', 'periodName': 'May'}{'series_id': 'LAUMT531338000000006', 'series_title': 'Labor Force: Bellingham, WA Metropolitan Statistical Area (U)', 'seasonality': 'Not Seasonally Adjusted', 'survey_name': 'Local Area Unemployment Statistics', 'survey_abbreviation': 'LA', 'measure_data_type': 'labor force', 'area': 'Bellingham, WA Metropolitan Statistical Area', 'area_type': 'Metropolitan areas'}{'data_type': None}"""### If you  want to get all the available series in Labor_Forceall_series=instance.add_all_series()all_series._from=2017all_series._to=2018forseries_data,catalog,type_inall_series:print(series_data)print(catalog)print(type_)LicenseMIT LicenseCopyright (c) 2022 Tien NguyenPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.