Skip to main content

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

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_congress-0.3.5-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file python-congress-0.3.5.tar.gz.

File metadata

File hashes

Hashes for python-congress-0.3.5.tar.gz
Algorithm Hash digest
SHA256 35a6b010801704470fb316a3ad180887857eec75ea84f9310f2e814d306aeaa3
MD5 3124622aa4b3ed6fd6dd692a466cb664
BLAKE2b-256 91983621dfd2bc2969e4348df7b66feb5a3619edb38608287a54725c9838a095

See more details on using hashes here.

File details

Details for the file python_congress-0.3.5-py3-none-any.whl.

File metadata

File hashes

Hashes for python_congress-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 62d839dd8cb7f332b7a6b9487179e52c45c779d65d4f1f179690f278f81e476e
MD5 2fe69981153a0cd4a3e373fdafff594b
BLAKE2b-256 207161ff8b47f85db8fcf7fd8d7c5782e5d2bee5e3c5b3b771f5b62c853292bb

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.5 This release

2 files

0.3.4

1 file

0.3.3

1 file

0.3.2

1 file

0.3.1

1 file

0.3.0

1 file

0.2.0

1 file

0.1.1

1 file

0.1.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page