Python library for GovTrack.us API
Project description
A Python wrapper for the GovTrack API (v2).
Based off of: - [https://github.com/cdelguercio/govtrack-python](https://github.com/cdelguercio/govtrack-python) - [https://github.com/markgx/govtrack-node/](https://github.com/markgx/govtrack-node/)
Installation
pip install gt-py
Usage
from gtpy.api import GTPY client = GTPY()
Choose an endpoint:
client.role() client.person() client.cosponsorship() client.vote client.bill() client.vote_voter() client.committee() client.committee_member()
Get a person:
>>>PERSON_ID = 400045 >>>client.person(PERSON_ID) {‘birthday’: ‘1952-10-20’, ‘link’: ‘https://www.govtrack.us/congress/members/jeb_bradley/400045’, ‘lastname’: ‘Bradley’…
Filter the results, such as getting all the bills voted by the 144th Congress (supports filtering on all [filterable fields](https://www.govtrack.us/developers/api)):
>>>CONGRESS_ID = 114 >>>client.bill({‘congress’: CONGRESS_ID})
Change the maximum number of results:
>>>client.bill({‘congress’: CONGRESS_ID, ‘limit’: 100})
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file gt-py-1.2.tar.gz
.
File metadata
- Download URL: gt-py-1.2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e1284d7816047df4c242b525573c46dcbcbce59b7f2653ebaa1e49020868ae7 |
|
MD5 | 78b12e6cf0807f9bb1ac7433742b1b78 |
|
BLAKE2b-256 | 6aac9ca11b02fab35991ebd93808fce1fe57af25dfe93d7f6b1a5bbb9b487c76 |