A Python client for the ProPublica Congress API
Project description
A Python client for the ProPublica Congress API
Install
From PyPI:
pip install python-congress
Download and run the install script:
git clone https://github.com/eyeseast/propublica-congress && cd propublica-congress python setup.py install
Usage
>>> from congress import Congress >>> congress = Congress(API_KEY) # get member by bioguide ID >>> pelosi = congress.members.get('P000197') >>> pelosi['twitter_id'] 'NancyPelosi' # get recent House bills # recent bills come in two types: 'introduced' and 'updated' >>> introd = congress.bills.recent(chamber='house', congress=111, type='introduced') >>> len(introd['bills']) 20 >>> introd['chamber'] 'House' # or use a convenience function >>> introd = congress.bills.introduced('house') >>> introd['chamber'] 'House' >>> len(introd['bills']) 20
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
python-congress-0.3.5.tar.gz
(8.0 kB
view hashes)
Built Distribution
Close
Hashes for python_congress-0.3.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62d839dd8cb7f332b7a6b9487179e52c45c779d65d4f1f179690f278f81e476e |
|
MD5 | 2fe69981153a0cd4a3e373fdafff594b |
|
BLAKE2b-256 | 207161ff8b47f85db8fcf7fd8d7c5782e5d2bee5e3c5b3b771f5b62c853292bb |