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.
Note
To authenticate, 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:
from parsons import Empower
# First approach: Use API key environment variables
# In bash, set your environment variables like so:
# export EMPOWER_API_KEY='MY_API_KEY'
empower = Empower()
# Second approach: Pass API keys as arguments
empower = Empower(api_key='MY_API_KEY')
You can then request tables in the following manner:
tbl = empower.get_profiles()
API
- class parsons.Empower(api_key=None, empower_uri=None, cache=True)[source]
Instantiate class.
- Args:
- 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 toFalse
will download all account data for each method call.
- get_profiles()[source]
Get Empower profiles.
- Returns:
- Parsons Table
See Parsons Table for output options.
- get_profiles_active_ctas()[source]
Get active ctas assigned to Empower profiles.
- Returns:
- Parsons Table
See Parsons Table for output options.
- get_regions()[source]
Get Empower regions.
- Returns:
- Parsons Table
See Parsons Table for output options.
- get_cta_results()[source]
Get Empower call to action results.
- Returns:
- Parsons Table
See Parsons Table for output options.
- get_ctas()[source]
Get Empower calls to action.
- Returns:
- Parsons Table
See Parsons Table for output options.
- get_cta_prompts()[source]
Get Empower calls to action prompts.
- Returns:
- Parsons Table
See Parsons Table for output options.
- get_cta_prompt_answers()[source]
Get Empower calls to action prompt answers.
- Returns:
- Parsons Table
See Parsons Table for output options.
- get_cta_regions()[source]
Get a list of regions that each call to active is active in.
- Returns:
- Parsons Table
See Parsons Table for output options.
Get a list of shareables associated with calls to action.
- Returns:
- Parsons Table
See Parsons Table for output options.
- get_cta_prioritizations()[source]
Get a list prioritizations associated with calls to action.
- Returns:
- Parsons Table
See Parsons Table for output options.
- get_outreach_entries()[source]
Get outreach entries.
- Returns:
- Parsons Table
See Parsons 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:
- Parsons Table
See Parsons Table for output options.