A Python library for the GovTrack.us API v2.
Based on https://github.com/markgx/govtrack-node/
For full API docs visit https://www.govtrack.us/developers/api
pip install govtrack
from govtrack.api import GovTrackClient
client = GovTrackClient()
client.bill()
client.cosponsorship()
client.person()
client.role()
client.vote()
client.vote_voter()
client.person({'lastname': 'Kennedy'})
client.person({'id': 123})
client.person(123)
Single response if you used an 'id':
{
'id': 65,
'bill_type': 'resolution',
'congress': 113
}
Multiple response if you used filters:
{
'meta': {
'some_meta_key_1': 123,
'some_meta_key_2': 'abc'
},
'objects': [
{
'id': 65,
'bill_type: 'resolution',
'congress': 113
},
{
'id': 66,
'bill_type': 'resolution',
'congress': 114
}
]
}