Skip to main content

Provides access to Azavea's Cicero API for legistrative district matching and elected official info

Project description

Introduction

collective.cicero provides access to Azavea’s Cicero API for performing geography-based lookups of political data. It is designed for integration with Plone, but can be used in other contexts as well.

Usage

Access to the API is provided via the call_cicero method:

call_cicero(service_name, method_name, *args, **kw)

service_name is one of the Cicero web services. Currently the only supported option is ‘ElectedOfficialQueryService’.

method_name is one of the SOAP methods supported by the chosen service.

*args and **kw are the additional parameters required by the chosen method. See the Cicero API documentation for details.

Settings

The Cicero credentials (username and password) are looked up via a plone.registry-style IRegistry utility. In Plone, activating the plone.app.registry package followed by collective.cicero will set up a suitable registry with the relevant settings available.

Test Mode

A test mode is supported. In test mode, canned responses will be loaded from disk instead of actually querying Cicero.

Enable test mode by setting the CICERO_TEST environment variable. If this variable is present in the operating system environment, test mode will be used.

For test mode to work, the tests folder must contain a copy of the WSDL for the service being tested, as well as a response file for the method being tested. Responses can be obtained by running in normal mode with suds configured to log at the debug level. A sample response for the GetOfficialsByAddress method of the ElectedOfficialQueryService is included.

Changelog

1.0 (2010-09-17)

  • Initial release

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

collective.cicero-1.0.zip (22.1 kB view details)

Uploaded Source

File details

Details for the file collective.cicero-1.0.zip.

File metadata

File hashes

Hashes for collective.cicero-1.0.zip
Algorithm Hash digest
SHA256 92e684f741a4b6daaa2ff7025c8788278f5d240e689546d80006ce22f1244db9
MD5 9a554914deb79097294724d5d064e52d
BLAKE2b-256 ace088a37682a87359647d0d7b42510d9020f48288890a927a68680117bc4bab

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