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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python-congress-0.3.5.tar.gz.
File metadata
- Download URL: python-congress-0.3.5.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35a6b010801704470fb316a3ad180887857eec75ea84f9310f2e814d306aeaa3
|
|
| MD5 |
3124622aa4b3ed6fd6dd692a466cb664
|
|
| BLAKE2b-256 |
91983621dfd2bc2969e4348df7b66feb5a3619edb38608287a54725c9838a095
|
File details
Details for the file python_congress-0.3.5-py3-none-any.whl.
File metadata
- Download URL: python_congress-0.3.5-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62d839dd8cb7f332b7a6b9487179e52c45c779d65d4f1f179690f278f81e476e
|
|
| MD5 |
2fe69981153a0cd4a3e373fdafff594b
|
|
| BLAKE2b-256 |
207161ff8b47f85db8fcf7fd8d7c5782e5d2bee5e3c5b3b771f5b62c853292bb
|