Empower

Overview

The Empower class allows you to interact with the Empower API. Documentation for the Empower API can be found in their GitHub repo.

The Empower API only has a single endpoint to access all account data. As such, it has a very high overhead. This connector employs caching in order to allow the user to specify the tables to extract without additional API calls. You can disable caching as an argument when instantiating the class.

Authentication

You must request a secret token from Empower.

Quickstart

To instantiate the Empower class, you can either store your EMPOWER_API_KEY as an environment variables or pass it in as an argument:

Use API key environment variables
from parsons import Empower
empower = Empower()
Pass API keys as arguments
from parsons import Empower
empower = Empower(api_key='MY_API_KEY')

You can then call class methods:

Request table of profiles
tbl = empower.get_profiles()

API

class parsons.empower.empower.Empower(api_key=None, empower_uri=None, cache=True)[source]

Instantiate class.

Parameters:
  • api_key – str The Empower provided API key.The Empower provided Client UUID. Not required if EMPOWER_API_KEY env variable set.

  • empower_uri – str The URI to access the Empower API. The default is currently set to https://api.getempower.com/v1/export. You can set an EMPOWER_URI env variable or use this URI parameter if a different endpoint is necessary.

  • cache – boolean The Empower API returns all account data after each call. Setting cache to True stores the blob and then extracts Parsons tables for each method. Setting cache to False will download all account data for each method call.

get_profiles()[source]

Get Empower profiles.

Returns:

Table

See Table for output options.

get_profiles_active_ctas()[source]

Get active ctas assigned to Empower profiles.

Returns:

Table

See Table for output options.

get_regions()[source]

Get Empower regions.

Returns:

Table

See Table for output options.

get_cta_results()[source]

Get Empower call to action results.

Returns:

Table

See Table for output options.

get_ctas()[source]

Get Empower calls to action.

Returns:

Table

See Table for output options.

get_cta_prompts()[source]

Get Empower calls to action prompts.

Returns:

Table

See Table for output options.

get_cta_prompt_answers()[source]

Get Empower calls to action prompt answers.

Returns:

Table

See Table for output options.

get_cta_regions()[source]

Get a list of regions that each call to active is active in.

Returns:

Table

See Table for output options.

get_cta_shareables()[source]

Get a list of shareables associated with calls to action.

Returns:

Table

See Table for output options.

get_cta_prioritizations()[source]

Get a list prioritizations associated with calls to action.

Returns:

Table

See Table for output options.

get_outreach_entries()[source]

Get outreach entries.

Returns:

Table

See Table for output options.

get_full_export()[source]

Get a table of the complete, raw data as returned by the API. Meant to facilitate pure ELT pipelines

Returns:

Table

See Table for output options.