Skip to content
This repository has been archived by the owner on Oct 3, 2021. It is now read-only.

tfc-code/pdl-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PDL Wrapper

This utility logs calls to PDL API into DynamoDB.

Installation

Add this line to your requirements.txt:

git+git://github.com/tfc-code/pdl-wrapper@master#egg=pdlwrapper

Then, in your terminal:

pip install -U -r requirements.txt

Usage

pdl_client = pdlwrapper.Client(
    account_id="bernie2020",
    env="prod", # can be dev, test or prod
    pdl_api_key="pdl_key",
    aws_access_key_id="aws_key",
    aws_secret_access_key="aws_secret",
    aws_region_name="us-east-2",
)

# See https://github.com/peopledatalabs/docs for valid attributes
payload = {
    "required": "emails AND phone_numbers",
    "country": "United States",
    "name": "Tom Steyer",
    "locality": "New York"
}

resp = pdl_client.get_person(params=payload)

The resp object is simply the return value of requests.get().