Skip to main content

Client to work with US Congress data

Project description

Imports: isort pre-commit

Release CI

US Congress

Client for getting information on the US Congress.

Requirements

For this package to work, you must get an API key from ProPublica, whose API this uses, and set the following the environment variable PROPUBLICA_CONG_KEY to whatever that key is, either with

export PROPUBLICA_CONG_KEY=<your key>

or in a .env file:

PROPUBLICA_CONG_KEY=<your key>

Getting started

To install with pip, simply run

pip install us_congress
>>> from us_congress import Congress
>>> cong = getCongress(116)
>>> cong
<Congress 116>

This will return a client for querying data on a particular congress (in the above example, the 116th Congress).

Right now, this enables only getting lists of Representatives and Senators:

cong.getRepresentatives() # DataFrame with all representatives
cong.getSenators()        # DataFrame with all senators

Project details


Download files

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

Source Distribution

us_congress-0.1.2a1.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

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

us_congress-0.1.2a1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file us_congress-0.1.2a1.tar.gz.

File metadata

  • Download URL: us_congress-0.1.2a1.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/5.4.0-1036-azure

File hashes

Hashes for us_congress-0.1.2a1.tar.gz
Algorithm Hash digest
SHA256 34bc40b3a0e76ee8986f7370adadc5551d4bdde7c9872901b33c191146e78fd0
MD5 2730b307e6b116649bbbd52839bafbc4
BLAKE2b-256 81e1ce6eb5ad17bf1278d78240a720588fd758c910cbaf23815c4530586210cc

See more details on using hashes here.

File details

Details for the file us_congress-0.1.2a1-py3-none-any.whl.

File metadata

  • Download URL: us_congress-0.1.2a1-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/5.4.0-1036-azure

File hashes

Hashes for us_congress-0.1.2a1-py3-none-any.whl
Algorithm Hash digest
SHA256 6993d9aef49efbd2887c763c22b7e3f5fc5b2cec5990de62641b2c207f3ceb0d
MD5 bff69ea198297365d611783394c76b05
BLAKE2b-256 c5aa990a971d15fb0c6a09ae95d58e413b6eb60a0038ef10e204c8c2f8e5e73c

See more details on using hashes here.

Supported by

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