Skip to main content

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

Download files

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

Source Distributions

python-nytcongress-0.1.0.zip (5.0 kB view details)

Uploaded Source

python-nytcongress-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

File details

Details for the file python-nytcongress-0.1.0.zip.

File metadata

File hashes

Hashes for python-nytcongress-0.1.0.zip
Algorithm Hash digest
SHA256 53c24e02e228614a030708c874ced71d2b9e136f1b97d6cc924a437db41b5a79
MD5 79b7c83987028bf08d3a2321e9efc36d
BLAKE2b-256 40fd98c9ce022a3c5d67af4a4d4730276ac1b641de84121584de7748aa3aacbe

See more details on using hashes here.

File details

Details for the file python-nytcongress-0.1.0.tar.gz.

File metadata

File hashes

Hashes for python-nytcongress-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4fc3d1ce4911ca1943df3d6bdf9e834ecc1203df920712e5003d0e5d8668cabb
MD5 779f130389b99790c7f79b089433c410
BLAKE2b-256 ca6a1384f6bb678df00a01461dec55f4b42f0847505032422bde3a4a0ba55136

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Supported by

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