MCPcopy Create free account
hub / github.com/LibraryOfCongress/api.congress.gov / print_items

Function print_items

api_client/python/bill_example.py:23–32  ·  view source on GitHub ↗

Print the items found.

(items)

Source from the content-addressed store, hash-verified

21
22
23def print_items(items):
24 """Print the items found."""
25 for i, item in enumerate(items):
26
27 print(f"{i + 1:2}. {item.tag}:")
28 for field in item:
29 if field.text:
30 print(f" - {field.tag + ':':20} {field.text.strip()!r}")
31
32 # print(root.xpath("count(.//bills/bill)"), 'bills') # lxml implements count()
33
34
35def get_bill(client):

Callers 4

get_bill_congressFunction · 0.70
get_bill_list_typeFunction · 0.70
get_bill_detailFunction · 0.70
get_bill_actionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected