Skip to main content

A Python module for accessing the Open States API & bulk data.

Project description

pyopenstates

A Python client for the Open States API v3.

Source: https://github.com/openstates/pyopenstates/

Documentation: https://openstates.github.io/pyopenstates/

Issues: https://github.com/openstates/pyopenstates/issues

Note: This library was recently updated to support Open States API v3, documentation & coverage is a bit behind, but we wanted to get a release out. Feel free to contribute issues and/or fixes.

PyPI badge Test Python

Features

  • Compatible with Python 3.7+
  • Automatic conversion of string dates and timestamps to datetime objects.
  • Tested releases.
  • Set API Key via environment variable or in code.

API Keys

To use the Open States API you must obtain an API Key.

Once you have your key you can use it with this library by setting the OPENSTATES_API_KEY environment variable or calling pyopenstates.set_api_key.

About Open States

Open States strives to improve civic engagement at the state level by providing data and tools regarding state legislatures. We aim to serve members of the public, activist groups, journalists, and researchers with better data on what is happening in their state capital, and to provide tools to reduce barriers to participation and increase engagement.

Open States aggregates legislative information from all 50 states, Washington, D.C., and Puerto Rico. This information is then standardized, cleaned, and published to the public via OpenStates.org, a powerful API, and bulk downloads. OpenStates.org enables individuals to find out who represents them, look up information on an important bill that’s been in the news, discover how their representatives are voting, or just stay current with what is happening in their state. Additionally, our API and bulk downloads see millions of hits every month from advocacy organizations, journalists, researchers, and many others.

Legislative data is collected from official sources, linked at the bottom of relevant pages. In general bill & vote data is collected multiple times a day via our scrapers while legislator data is curated by our team & volunteers like you.

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

pyopenstates-2.2.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

pyopenstates-2.2.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file pyopenstates-2.2.0.tar.gz.

File metadata

  • Download URL: pyopenstates-2.2.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.9.7 Darwin/20.6.0

File hashes

Hashes for pyopenstates-2.2.0.tar.gz
Algorithm Hash digest
SHA256 99b5154b477eaab5ede436277b5bb7b582707b5b658d7f092d2f9e70fd9644d1
MD5 22ede23df9f5269fc182e1feb98308c0
BLAKE2b-256 756a76a7d9c0c53f8e10243b21b9f2e30ab26e13365cf38d74f3e24c512f3ca9

See more details on using hashes here.

File details

Details for the file pyopenstates-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: pyopenstates-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.9.7 Darwin/20.6.0

File hashes

Hashes for pyopenstates-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 546c98ff62732649443647babaa2149b40ab5d4481b1ba4828718e2a09652e57
MD5 21c2085b76106a943685a1a445868560
BLAKE2b-256 3b80a25dd4874329d6628d609b523eaccee3ea948cd433c4c5de5727079c4f9a

See more details on using hashes here.

Supported by

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