A Python client for the ProPublica Congress API
Project description
A Python client for the ProPublica [Congress API](https://propublica.github.io/congress-api-docs/)
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
File details
Details for the file python-congress-0.3.1.tar.gz.
File metadata
- Download URL: python-congress-0.3.1.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d069e8561c1ee4f7d14bcdaf8124ee9fe85b445a0d5e70078e981003f4fd25ee
|
|
| MD5 |
959c86d3ae76f8f1474811ba6e1815c1
|
|
| BLAKE2b-256 |
26074f9acdf844dcee0f81a3c513bda86f6c2e3814a7a330545d13670f781432
|