-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into ianferguson/gcs-pathing
Merging main branch
- Loading branch information
Showing
34 changed files
with
7,286 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,9 +84,9 @@ celerybeat-schedule | |
|
||
# Environments | ||
.env | ||
.venv | ||
.venv* | ||
env/ | ||
venv/ | ||
venv*/ | ||
ENV/ | ||
env.bak/ | ||
venv.bak/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
Catalist | ||
======= | ||
|
||
******** | ||
Overview | ||
******** | ||
|
||
The CatalistMatch class allows you to interact with the Catalist M Tool (match) API. Users of this Parsons integration can use the Parsons table format to send input files to the M Tool and receive back a matched version of that table. | ||
|
||
.. note:: | ||
Authentication | ||
In order to use this class you must be provided with an OAuth Client ID and Client Secret from catalist, as well as SFTP credentials. You will also need to have Catalist whitelist the IP address you are using to access the M Tool. | ||
|
||
========== | ||
Quickstart | ||
========== | ||
|
||
To instantiate the CatalistMatch class, you must provide your ``client_id``, ``client_secret``, ``sftp_username`` and ``sftp_password`` values as arguments: | ||
|
||
.. code-block:: sh | ||
# In bash, set your environment variables like so: | ||
$ export CATALIST_CLIENT_ID='MY_UUID' | ||
$ export CATALIST_CLIENT_SECRET='MY_SECRET' | ||
$ export CATALIST_SFTP_USERNAME='MY_USERNAME' | ||
$ export CATALIST_SFTP_PASSWORD='MY_PASSWORD' | ||
.. code-block:: python | ||
import os | ||
from parsons import CatalistMatch | ||
match = CatalistMatch( | ||
client_id=os.environ['CATALIST_CLIENT_ID'], | ||
client_secret=os.environ['CATALIST_CLIENT_SECRET'], | ||
sftp_username=os.environ['CATALIST_SFTP_USERNAME'], | ||
sftp_password=os.environ['CATALIST_SFTP_PASSWORD'] | ||
) | ||
You can then load a CSV as a Parsons table and submit it for matching, then save the resulting matched Parsons table as a CSV. | ||
|
||
.. code-block:: python | ||
source_table = Table.from_csv(source_filepath) | ||
result_table = match.match(source_table) | ||
result_table.to_csv(result_filepath) | ||
*** | ||
API | ||
*** | ||
|
||
.. autoclass :: parsons.CatalistMatch | ||
:inherited-members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -205,6 +205,7 @@ Indices and tables | |
hustle | ||
mailchimp | ||
mobilecommons | ||
mobilize_america | ||
nation_builder | ||
newmode | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
MobileCommons | ||
========== | ||
|
||
******** | ||
Overview | ||
******** | ||
|
||
`MobileCommons <https://secure.mcommons.com/>`_ is a broadcast text messaging tool that helps orgranizations | ||
mobilize supporters and fundraise by building opt-ed in audiences. You can read more about the product | ||
`here <https://uplandsoftware.com/mobile-messaging/>`_. | ||
|
||
*********** | ||
Quick Start | ||
*********** | ||
|
||
To instantiate a class you must pass the username and password of a MobileCommons account as an argument | ||
or store the username and password into environmental variables called ``MOBILECOMMONS_USERNAME`` and | ||
``MOBILECOMMONS_PASSWORD``, respectively. If you MobileCommons account has access to various MobileCommons | ||
companies (i.e. organizations), you'll need to specify which MobileCommons company you'd like to interact | ||
with by specifying the Company ID in the ``company_id`` parameter. To find the Company ID, navigate to the | ||
`Company and Users page <https://secure.mcommons.com/companies/>`_. | ||
|
||
.. code-block:: python | ||
from parsons import MobileCommons | ||
# Pass credentials via environmental variables for account has access to only one MobileCommons company | ||
mc = MobileCommons() | ||
# Pass credentials via environmental variables for account has access to multiple MobileCommons companies | ||
mc = MobileCommons(company_id='EXAMPLE78363BOCA483954419EB70986A68888') | ||
# Pass credentials via argument for account has access to only one MobileCommons company | ||
mc = MobileCommons(username='octavia.b@scifi.net', password='badpassword123') | ||
Then you can call various endpoints: | ||
|
||
.. code-block:: python | ||
# Return all MobileCommons subscribers in a table | ||
subscribers = get_campaign_subscribers(campaign_id=1234567) | ||
# Create a new profile, return profile_id | ||
new_profile=create_profile(phone=3073991987, first_name='Jane', last_name='Fonda') | ||
*** | ||
API | ||
*** | ||
.. autoclass :: parsons.MobileCommons | ||
:inherited-members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.