Skip to main content

U.S. Bureau of Labor Statistics connector for the parsimony framework

Project description

parsimony-bls

US Bureau of Labor Statistics connector — labor market, employment, inflation (CPI), and producer price time series.

Part of the parsimony-connectors monorepo. Distributed standalone on PyPI as parsimony-bls.

Connectors

Name Kind Description
bls_fetch fetch Fetch a single BLS time series by series_id between two years.
enumerate_bls enumerator Enumerate popular BLS series across all surveys via the /surveys and /timeseries/popular endpoints.

Install

pip install parsimony-bls

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

The API key is optional — the plugin works without one but registering gives you higher rate limits.

export BLS_API_KEY="<your-key>"   # optional

Register for a free key at https://data.bls.gov/registrationEngine/.

Quick start

import asyncio
from parsimony_bls import CONNECTORS

async def main():
    connectors = CONNECTORS.bind_env()
    # LNS14000000 = US unemployment rate (seasonally adjusted)
    result = await connectors["bls_fetch"](
        series_id="LNS14000000",
        start_year="2020",
        end_year="2024",
    )
    print(result.data.head())

asyncio.run(main())

For multi-plugin composition (autoloads everything installed):

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_bls-0.4.0.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parsimony_bls-0.4.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file parsimony_bls-0.4.0.tar.gz.

File metadata

  • Download URL: parsimony_bls-0.4.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for parsimony_bls-0.4.0.tar.gz
Algorithm Hash digest
SHA256 324d1f53ba54de3b0c90f6a37cb5589f13af92657b782b4a4ca72255549fc915
MD5 2614ad2840748332ca85b55772d2ed44
BLAKE2b-256 edf27bacf7181f79c28c0c359ec5e4ae657cf4a928962ee42b759f062cc1f4ec

See more details on using hashes here.

Provenance

The following attestation bundles were made for parsimony_bls-0.4.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_bls-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: parsimony_bls-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for parsimony_bls-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ae797c091625232909ac47dc43c9cdcc159ad146d97b41783b4c94786458384
MD5 ec248d45bbe2d9ba6c2af1298c0fe8a1
BLAKE2b-256 977cf5958a5d1686326fce16907fd854f49f672373b6c97d97bac9679e2be9ae

See more details on using hashes here.

Provenance

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