GitXplorerGitXplorer
e

propublica-congress

public
54 stars
19 forks
12 issues

Commits

List of commits on branch master.
Verified
e13a62baadc3ac4ff5968b9e21a93d4d4947ed2f

Merge pull request #34 from astrowonk/master

eeyeseast committed 5 years ago
Unverified
1a18d11c88ea5704f7d5a9581fcdc7e6e43c2585

Better doc string, checkchamber

aastrowonk committed 6 years ago
Unverified
22fdc870e6807a946f3e01b3c08b2ea5552c7555

add end point for chamber member list

aastrowonk committed 6 years ago
Unverified
4c823c9a664894eda51f4de09fc1140c03a89297

restore ReadMe

aastrowonk committed 6 years ago
Verified
4b62fb67295930fdb4c9b8e5dfada3bda44ac884

Update README.md

aastrowonk committed 6 years ago
Verified
d623fdf2cc8e0d4cf26bd1667723f271bdf11b99

adds recent votes end point.

aastrowonk committed 6 years ago

README

The README file for this repository.

Python Congress

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