Metadata-Version: 2.0
Name: python-congress
Version: 0.3.5
Summary: A Python client for the ProPublica Congress API
Home-page: https://github.com/eyeseast/propublica-congress
Author: Chris Amico
Author-email: eyeseast@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Requires-Dist: httplib2
Requires-Dist: six

Python Congress
===============

A Python client for the ProPublica `Congress
API <https://projects.propublica.org/api-docs/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


