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
File details
Details for the file python-nytcongress-0.1.0.zip.
File metadata
- Download URL: python-nytcongress-0.1.0.zip
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53c24e02e228614a030708c874ced71d2b9e136f1b97d6cc924a437db41b5a79
|
|
| MD5 |
79b7c83987028bf08d3a2321e9efc36d
|
|
| BLAKE2b-256 |
40fd98c9ce022a3c5d67af4a4d4730276ac1b641de84121584de7748aa3aacbe
|
File details
Details for the file python-nytcongress-0.1.0.tar.gz.
File metadata
- Download URL: python-nytcongress-0.1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fc3d1ce4911ca1943df3d6bdf9e834ecc1203df920712e5003d0e5d8668cabb
|
|
| MD5 |
779f130389b99790c7f79b089433c410
|
|
| BLAKE2b-256 |
ca6a1384f6bb678df00a01461dec55f4b42f0847505032422bde3a4a0ba55136
|