Skip to main content

A simpler wrapper for Sunlight's Congress API

Project description

Sometimes, all you need is the data. This is the simplest possible wrapper I could make. It returns decoded JSON, with some fat trimmed. It should stay out of your way.


>>> from sunlight import Sunlight
>>> sunlight = Sunlight(API_KEY)
>>> pelosi = sunlight.legislators.get(lastname='pelosi')
>>> print pelosi['firstname']

This should work with any method on Sunlight’ Congress API defined here:

See for more details and examples.

Project details

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page