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_python-0.0.4.tar.gz (10.8 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_python-0.0.4-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file tdg_connector_python-0.0.4.tar.gz.

File metadata

  • Download URL: tdg_connector_python-0.0.4.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.10.12

File hashes

Hashes for tdg_connector_python-0.0.4.tar.gz
Algorithm Hash digest
SHA256 6c1a4811b2b3ffb3e13f091bdd178a26bd2cf44a74fdd146ecac93ca36a8039f
MD5 10a894635ca9d3baf766a16b98abffb4
BLAKE2b-256 71f830421fbfa09362ce3853870492a128d1455ff7ad270f78a4148b27b1304e

See more details on using hashes here.

File details

Details for the file tdg_connector_python-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for tdg_connector_python-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 41d69d342ed5394dd7163b1e8513346c6f424197afd995c4633d91a4a11905f2
MD5 930c4b4c39dc604956ff662a233bd344
BLAKE2b-256 831a8cee4a632bfacaecd429acd1635ead5150f0e06b6c4f44cb3d7d62678232

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