pydol provides a pythonic interface to the U.S. Department of Labor API. It can be used to fetch official unemployment numbers and other interesting data.
from pydol import DOLAPI
# Create an instance of the API
DOL = DOLAPI("d9c6c290-da4c-424e-a378-fb4bd027b58b",
"mysecret11111111111")
# Get dataset metadata as a dictionary structure
# Multi-part dataset names are separated by a /
BLS = DOL.metadata("statistics/BLS_Numbers")
# Get table data as a list of dictionaries
UNEMPLOYMENT = DOL.table("statistics/BLS_Numbers", "unemploymentRate")
# Detailed examples at docs/examples.rst
It is well documented, easy-to-use, PEP 8 compliant, and unit tested.
Dependencies
Obtaining API credentials
Valid API credentials are required to request data from tables. To obtain credentials:
Create a DOL developer account and log in
- Create a new token/key
You must provide:
A random shared secret:
>>> import os >>> import binascii >>> binascii.hexlify(os.urandom(32)) 'daae7948824525c1b8b59f9d5a75e9c0404e46259c7b1e17a4654a7e73c91b87'
An application name
An application description
The token/key will be generated after the submission of the form
Note: The words token and key are used interchangeably
This project is not affiliated with or endorsed by the U.S. Department of Labor.
Release files for pydol 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pydol-1.0.3-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Release files / pydol-1.0.3-py2.py3-none-any.whl
| Download URL | pydol-1.0.3-py2.py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
6ff702092fac66ef3cb566cb712f47818253e1e634b04efe18b693deea7e3cce
|
|
BLAKE2b-256 checksum How to use checksums |
7ad6a76e7a6a95e354e16816ec1b2ba1679bfc1d3c58702f7c5d7b7ad5e684d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |