Skip to main content

Python-Outreach

Python wrapper functions for Outreach APIs, tested with Python 3.8 - 3.9.

This python client wrapper helps connects outreach API by authentication flow, any request use two distinct sets of credentials. The API key and secret identify the requester.

Quick Start

  1. Installation
    1. Dependent libraries The following dependent libraries were installed.

    pip install singer-python pip install requests

    1. Install from pypi using pip

    pip install python-outreach

    1. Clone this repository, and then install using setup.py. Recommend using a virtualenv:
    > virtualenv -p python3 venv
    > source venv/bin/activate
    > python setup.py install
    OR
    > cd .../python-outreach
    > pip install .
    
  2. Set the environment variables, refresh_token, redirect_uri, client_id, and client_secret are the credentials need to set for outreach client. More details for Authentication is here
    export client_id=<Application_Identifier>
    export client_secret=<Application_Secret>
    export redirect_uri=<Application_Redirect_URI>
    export refresh_token=<Refresh_Token>
    
  3. To work with the API client, we start with the OutreachClient class:
    connect_config = {
            'user_agent': '',
            'client_id': environ['OUTREACH_CLIENT_ID'],
            'client_secret': environ['OUTREACH_CLIENT_SECRET'],   
            'redirect_uri': environ['OUTREACH_REDIRECT_URI'],
            'refresh_token': environ['OUTREACH_REFRESH_TOKEN'],
            'quota_limit': 9999
        }
    or_client = OutreachClient(connect_config)
    
  4. To Fetch prospects by email address or prospect id use
    or_client.get(path=f'prospects?filter[emails]={:email}')
    # or
    or_client.get(path=f'prospects/{:id}')
    
  5. To Create new prospects or update existing
     # To Create New  
     or_client.post(path=f'prospects',
                               json={
                                   "data": {
                                       "type": "prospect",
                                       "attributes": {:Prospect_rec_attributes key:value}
                                   }
                               })
    
     # For update
     or_client.update(path=f'prospects/{prospect_id}',   
                              json={
                                  "data": {
                                      "type": "prospect",
                                      "id": int(prospect_id),
                                      "attributes": prospect_rec
                                  }
                              })  
    

Feature requests

To request a new feature in this package, please open a new issue on the Github repo. To report problems, please open a new issue on the Github repo.

Contribution

Pull requests are welcomed! All pull requests must have the following:

  • OK global score from pylint using PEP8 standards
    • This one is a bit loose for now given that the old code is still a mess; once the renovation is complete, we will implement a minimum passing pylint score
  • Passing unit tests (nosetests) that cover the included use cases and pass the current tox config

Metadata

Release files for python-outreach 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-outreach 0.1.5
File Size Uploaded
python-outreach-0.1.5.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-outreach 0.1.5
File Interpreter ABI Platform
python_outreach-0.1.5-py2-none-any.whl Python 2 none any Details

Total release size: 9.6 kB

Release files / python-outreach-0.1.5.tar.gz

Download URL python-outreach-0.1.5.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
e5a7a682ef2e7e9628fc7a4edc38b77caa6c4b1b02ad66bac5195681f4396c96
BLAKE2b-256 checksum
How to use checksums
7929d28b5d23b88058aa1ba350656efb42cd36122e74d34f412df14272e02d77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

Release files / python_outreach-0.1.5-py2-none-any.whl

Download URL python_outreach-0.1.5-py2-none-any.whl
Size 5.1 kB
Tags Python 2
SHA-256 checksum
How to use checksums
c4045a10e0de7a8b3d913d99569e43d01bb5b5cea96ffb45a4b7ceee77b6a918
BLAKE2b-256 checksum
How to use checksums
c1b435fb5ed22973e147fefd88f38ec66dc31e9ffbdcf3e54ee85e5d06ab899b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

3 release files

0.0.4

3 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page