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.
  • first_name: str, (OPTIONAL) The first name of the individual (up to 15 characters).
  • last_name: str, (OPTIONAL) The last name of the individual (up to 20 characters).
  • 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.1.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.1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tdg_connector_python-0.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 f74fe73eb52462a699fffa120eb2a31944ec551d580e613d8cf14d0679f8dfd2
MD5 b2fefec0aadc99182ac8e02219aa712a
BLAKE2b-256 0a7f599ec929969ed14252f03d39166c9a038813790ceb27e6c10d0bec5074c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tdg_connector_python-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 41beb3442ad0e0df094f8ab16a1e5467aa24977ab4293bf978c9999e9153bc56
MD5 f01cbf4aa8ffed35b9d49dfdd1e4d4c1
BLAKE2b-256 92e1adc423955455b7aff4847797895cfbc37a304073b3e881edcd5190c9e194

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