A Python library for the Bureau of Labor Statistics API.
Use the function
get_series() to retrieve data.
get_series() has four
arguments: a series id or sequence of series ids, a start year, an end year, and
an optional API key.
It is highly recommended that you register for an API key with
BLS. You can supply the key to the
library by passing it to
get_series() or by setting an environment variable
The timespan returned by the
get_series() function depends on whether you
api or some combination thereof, as shown in
the table below:
|no||no||no||BLS default (last 3 years)|
|yes||no||no||Ten years starting from
|no||yes||no||Ten years ending with
|no||no||yes||BLS default (last 3 years)|
|no||yes||yes||Twenty years ending with
bls is under development. Look for new features in the near future, and report
bugs at https://github.com/OliverSherouse/bls/issues.