Skip to content

Instantly share code, notes, and snippets.

@rruntsch
Created April 23, 2022 11:41
Show Gist options
  • Save rruntsch/2a37e3285122c4f58c70d3207250594d to your computer and use it in GitHub Desktop.
Save rruntsch/2a37e3285122c4f58c70d3207250594d to your computer and use it in GitHub Desktop.
Call the constructor of the c_us_debt_api Python class with the specified folder and file name, start date, and end date.
#
# Name: get_us_debt.py
# Date: April 22, 2022
# Author: Randy Runtsch
#
# Description:
#
# Use the c_us_debt class to obtain the total debt
# owed by the US federal government, by day, for a range
# of dates.
from c_us_debt import c_us_debt
#
# Call the c_bls_data constructor with these parameters:
#
# - Folder and JSON file name where debt data will be written.
# - Start date in format YYYY-MM-DD.
# - End date in format YYYY-MM-DD.
#
c_us_debt('c:/us_treasury_data/debt.json', '2002-01-01', '2022-04-21')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment