Skip to main content

A Python client for the New York Times Congress API

Project description

A Python client for the New York Times [Congress API](http://developer.nytimes.com/docs/congress_api)

Install

$ pip install python-nytcongress

Or download and run

$ python setup.py install

Usage

>>> from nytcongress import NytCongress
>>> congress = NytCongress(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

This version
History Node

0.1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
python-nytcongress-0.1.0.tar.gz (3.8 kB) Copy SHA256 hash SHA256 Source None Nov 16, 2010
python-nytcongress-0.1.0.zip (5.0 kB) Copy SHA256 hash SHA256 Source None Nov 16, 2010

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page