Skip to main content

TdgAPI Python Client

Project description

Project description

tdg-api-connector Python Client

This Python Client is the official Python Wrapper around the TDG API.

Installation

Install from pip:

pip install tdg-connector-python

Usage

All the API calls are wrapped in the tdg_api_connector package

In your Python application, import the packages with import tdg_api_connector.api with the required api and pass authentication information to initialize it:

from tdg_api_connector.api.append import AppendAPI
data = AppendAPI('api-key')

AppendAPI

  • get_phone :-

A function that allows users to query for phone numbers matching names and addresses by providing certain input fields such as first name, last name, address, and zip code. The API then returns appended telephone numbers along with other phone attributes such as record type, telephone confidence score, and directory assistance flag.

Parameters:

  • first_name: str, (REQUIRED) The first name of the individual (up to 15 characters).\n
  • last_name: str, (REQUIRED) The last name of the individual (up to 15 characters).
  • address: str, (REQUIRED) The address of the individual (up to 60 characters).
  • zip_number: int, (REQUIRED) 5-digit numeric USPS zip code. Either City/State or Zip is required.
  • max_score: str, (OPTIONAL) Filters by Match Score (up to 3 characters). For example, max_score="299" will include all individual and household level matches
from tdg_api_connector.api.append import AppendAPI
connector = AppendAPI('api-key')
data = connector.get_phone('first_name', 'last_name', 'address', 'zip_number')

  • get_email :-

A function that retrieves email details based on names and addresses. The Api returns appended email when suppression is False along with other attributes score, category, suppression.

Parameters:

  • first_name: str, (REQUIRED) The first name of the individual (up to 15 characters).
  • last_name: str, (REQUIRED) The last name of the individual (up to 20 characters).
  • address: str, (REQUIRED) The address of the individual (up to 64 characters).
  • zip_number: int, (REQUIRED) 5-digit numeric USPS zip code.
  • suppression: bool, (OPTIONAL) Specifies whether to suppress records containing restrictions, hiding information. Default is True.
  • includemonths: int, (OPTIONAL) An integer value representing the timeframe in months. For example, includemonths=24 would include records validated within the last 2 years.
  • max_score: str, (OPTIONAL) Filters results by Match Score (up to 3 characters). For example, max_score="299" will include all individual and household level matches.
from tdg_api_connector.api.append import AppendAPI
connector = AppendAPI('api-key')
data = connector.get_email('first_name', 'last_name', 'address', 'zip_number')

  • get_demographic :-

A function that retrieves details demographic details based on names, addresses, (email or phone number).

Parameters:

  • first_name: str, (Should be a combination of FName, LName, Zip, and Address parameters; Phone or Email is REQUIRED) The first name of the individual (up to 15 characters).
  • last_name: str, (Should be a combination of FName, LName, Zip, and Address parameters; Phone or Email is REQUIRED) The last name of the individual (up to 20 characters).
  • address: str, (Should be a combination of FName, LName, Zip, and Address parameters; Phone or Email is REQUIRED) Address 64 characters max.
  • zip_number: int, (Should be a combination of FName, LName, Zip, and Address parameters; Phone or Email is REQUIRED) 5-digit numeric USPS zip code. * Either City/State or Zip is required.
  • phone: int, (REQUIRED if Email is not included and other parameters are included) 10 digit numeric phone number (without spaces, dashes, or parentheses)
  • email: str, (REQUIRED if phone is not included and other parameters are included) Email address, 100 characters max
  • city: (OPTIONAL) City name, 28 characters max. * Either City/State or Zip is required.
  • state: (OPTIONAL) 2 character state abbreviation. * Either City/State or Zip is required.
  • full_name: str, (OPTIONAL) full name of individual
from tdg_api_connector.api.append import AppendAPI
connector = AppendAPI('api-key')
data = connector.get_demographic('first_name', 'last_name', 'address', 'zip_number', 'phone', 'email')

  • get_auto :-

A function that retrieves Auto/Vehicles details based on names and addresses.

Parameters:

  • full_name: str, (REQUIRED) The full name of the individual
  • address: str, (REQUIRED) The address of the individual (up to 64 characters).
  • zip_number: int, (REQUIRED) 5-digit numeric USPS zip code.
  • phone: int, (REQUIRED if Email is not included and other parameters are included) 10 digit numeric phone number (without spaces, dashes, or parentheses)
  • email: str, (REQUIRED if phone is not included and other parameters are included) Email address, 100 characters max
from tdg_api_connector.api.append import AppendAPI
connector = AppendAPI('api-key')
data = connector.get_auto('full_name', 'address', 'zip_number', 'phone', 'email')

LookupAPI

  • get_phone :-

A function that gets the details for a single phone number.

Parameters:

  • phone_number: int, (REQUIRED) 10-digit numeric phone number (without spaces, dashes, or parentheses).
from tdg_api_connector.api.lookup import LookupAPI
connector = LookupAPI('api-key')
data = connector.get_phone('phone')

  • get_email :-

A function that gets the details by email.

Parameters:

  • email: str, (REQUIRED) 100 characters max.
from tdg_api_connector.api.lookup import LookupAPI
connector = LookupAPI('api-key')
data = connector.get_email('email')

  • get_email_details_in_bulk :-

A function that gets the details for multiple emails in bulk.

Parameters:

  • email_list: list, (REQUIRED) list of valid emails not greater than 100 emails in a list
from tdg_api_connector.api.lookup import LookupAPI
connector = LookupAPI('api-key')
data = connector.get_email_details_in_bulk(['email@abc.com', 'email2@abc.com'])

  • get_phone_details_in_bulk :-

A function that gets the details for multiple phone numbers in bulk.

Parameters:

  • phone_numbers: list, (REQUIRED) List of 10-digit numeric phone numbers (without spaces, dashes, or parentheses), not greater than 100 numbers in a list
from tdg_api_connector.api.lookup import LookupAPI
connector = LookupAPI('api-key')
data = connector.get_phone_details_in_bulk([5555555555, 5555555555])

VerifyAPI

  • get_id

This function is used to assess the validity of consumer contact information, identify potential risks or fraud, and make informed decisions based on the verification scores and summaries provided by the service.

Parameters: (ATLEAST 2 PARAMETERS WITH ANY COMBINATION REQUIRED TO CHECK THE ACCURACY SCORE):

  • first_name: str The first name of the individual. Maximum 15 characters.
  • last_name: str The last name of the individual. Maximum 20 characters.
  • address: str The address of the individual. Maximum 64 characters.
  • zip_number: int The 5-digit numeric USPS zip code. Either City/State or Zip is required.
  • phone: str The 10-digit numeric phone number without spaces, dashes, or parentheses.
  • email: str The email address of the individual. Maximum 100 characters.
from tdg_api_connector.api.verify import VerifyAPI
connector = VerifyAPI('api-key')
data = connector.get_id('first_name', 'last_name')

  • get_tcpa_info

function to make a request to the TCPA Verify endpoint to mitigate TCPA risk by identifying wireless numbers and offering identity verification for called party consent.

Parameters:

  • phone (Required)
    10 digit numeric phone number (without spaces, dashes, or parentheses)
  • last_name (Required) The last name of the individual. Maximum 20 characters.
from tdg_api_connector.api.verify import VerifyAPI
connector = VerifyAPI('api-key')
data = connector.get_tcpa_info('phone', 'last_name')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tdg_connector_py-0.1.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tdg_connector_py-0.1.0-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file tdg_connector_py-0.1.0.tar.gz.

File metadata

  • Download URL: tdg_connector_py-0.1.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for tdg_connector_py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e357f9c5ee349df4791bc334eaf64a9945a23b5206e4bbe3de29aca3f349c0bf
MD5 9b21b6ccb72004073b1d91cf114ca247
BLAKE2b-256 a9816df1039e735e500bf5e564994abe901151f14b91d2ddc808ece6e82b02cc

See more details on using hashes here.

File details

Details for the file tdg_connector_py-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tdg_connector_py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e33585ff5af8578db56f967707686ef5bc89d1a6cdc5931b6c1d68860e1c1997
MD5 f9ab8d067584bac24af256e64ae65176
BLAKE2b-256 3c20ee86f88a178d573b064074af0af4f6e2c974577b157015b7b4c5788a0e46

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page