Copper
Overview
The Copper class allows you to pull person, company, and activity data - along with related metadata - from the Copper CRM.
Note
- Getting Your API Key
Sign into Copper
Click on
Settings
(gear icon) and thenAPI Keys
Click the
GENERATE API KEY
button
API
- class parsons.Copper(user_email=None, api_key=None)[source]
Instantiate Copper Class
- Args:
- user_email:
The email of the API user for Copper. Not required if
COPPER_USER_EMAIL
env variable set.- api_key:
The Copper provided application key. Not required if
COPPER_API_KEY
env. variable set.
- Returns:
Copper Class
- get_people(filters=None, tidy=False)[source]
Get people
- Args:
- filters: dict
Optional; pass additional parameters to filter the records returned. See Copper documentation for choices
- tidy: boolean or int
Optional; unpack list and dict columns as additional rows instead of columns If True: creates new table out of unpacked rows If ‘int’: adds rows to original table if max rows per key <= given number (so tidy=0 guarantees new table)
- Returns:
- List of dicts of Parsons Tables:
people
people_emails
people_phone_numbers
people_custom_fields
people_socials
people_websites
- get_companies(filters=None, tidy=False)[source]
Get companies
- Args:
- filters: dict
Optional; pass additional parameters to filter the records returned. See Copper documentation for choices
- tidy: boolean or int
Optional; unpack list and dict columns as additional rows instead of columns If True: creates new table out of unpacked rows If ‘int’: adds rows to original table if max rows per key <= given number (so tidy=0 guarantees new table)
- Returns:
- List of dicts of Parsons Tables:
companies
companies_phone_numbers
companies_custom_fields
companies_socials
companies_websites
- get_activities(filters=None, tidy=False)[source]
Get activities
- Args:
- filters: dict
Optional; pass additional parameters to filter the records returned. See Copper documentation for choices Optional; unpack list and dict columns as additional rows instead of columns If True: creates new table out of unpacked rows If ‘int’: adds rows to original table if max rows per key <= given number (so tidy=0 guarantees new table)
- Returns:
- List of dicts of Parsons Tables:
activities
- get_opportunities(filters=None, tidy=False)[source]
Get opportunities (i.e. donations)
- Args:
- filters: dict
Optional; pass additional parameters to filter the records returned. See Copper documentation for choices Optional; unpack list and dict columns as additional rows instead of columns If True: creates new table out of unpacked rows If ‘int’: adds rows to original table if max rows per key <= given number (so tidy=0 guarantees new table)
- Returns:
- List of dicts of Parsons Tables:
opportunities
opportunities_custom_fields
- get_custom_fields()[source]
Get custom fields
- Args:
filters: dict Optional; pass additional parameters to filter the records returned. See Copper documentation for choices
- Returns:
- List of dicts of Parsons Tables:
custom_fields
custom_fields_available
custom_fields_options
- get_activity_types()[source]
Get activity types
- Args:
filters: dict Optional; pass additional parameters to filter the records returned. See Copper documentation for choices
- Returns:
- List of dicts of Parsons Tables:
activitiy_types
- get_contact_types()[source]
Get contact types
- Args:
filters: dict Optional; pass additional parameters to filter the records returned. See Copper documentation for choices
- Returns:
- Parsons Table
See Parsons Table for output options.