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.5.0.tar.gz (9.7 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.5.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: parsimony_bls-0.5.0.tar.gz
  • Upload date:
  • Size: 9.7 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.5.0.tar.gz
Algorithm Hash digest
SHA256 3142aec7e4a9c6d65c6de005909dfaaa7ff16842d0341bdf6e47ae1e9d5beb2c
MD5 7ff3744c494a78cdb0537c254cc3f54e
BLAKE2b-256 f853cb804030a269867fd24489052d0dc885c8a4300698a32accf91dca343290

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: parsimony_bls-0.5.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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df35ae2c28ddd47c2b20aaf95bc84e24220158db02d5f2a1e3198e783a8c3c69
MD5 92c4960963ffcc1c6c67fae315533921
BLAKE2b-256 450ab7021bcba83ea463585b295f113e99fdc238934265876bcb80399378749a

See more details on using hashes here.

Provenance

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