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

Latest commit

 

History

History
40 lines (31 loc) · 847 Bytes

README.md

File metadata and controls

40 lines (31 loc) · 847 Bytes

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().