Skip to main content
2 of 2
added more tags

Cannot get data from FPDS atom feed using pyfpds

I have a script which uses the pyfpds wrapper (https://github.com/18F/pyfpds) to extract contract data from the FPDS Atom Feed (www.fpds.gov).

Following is the code I have and this used to work till last week. Presently, this doesn't work if I have a date field filter in the get() method.

from pyfpds import Contracts
from datetime import datetime, timedelta

def main():
    c = Contracts()
    print("\nSearching in PIID: "+piid)
    yesterday = datetime.strftime(datetime.now() - timedelta(2), '%Y-%m-%d')
    records = c.get(agency_name="SECURITIES AND EXCHANGE COMMISSION",last_modified_date=yesterday)
    c.pretty_print(records)
# end of main()
if __name__ == '__main__':
    main()

The code works without any issues if I remove the date field filter from the get() method.

I also tried with other date fields such as signed_date and created_on, and it doesn't make any difference.

Is there any specific change in FPDS Atom Feed which prevents the date filters in the requests?