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

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

  • get_email

Function is responsible for validating whether a given email address is correctly formatted and optionally whether it exists or can receive emails. It can be used to prevent invalid or disposable email addresses from being submitted to the system.

Parameters:

  • email: str (Required)
    The email address to verify. Maximum 100 characters.
from tdg_api_connector.api.verify import VerifyAPI
connector = VerifyAPI('api-key')
data = connector.get_email('email')

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.5.tar.gz (10.6 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.5-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tdg_connector_python-0.0.5.tar.gz
Algorithm Hash digest
SHA256 5bac27d3bae68902addec94467e16528293f61eefdeafce56fbfc83a806d8059
MD5 f52b4ea2b4a967cd241117d35c7578d0
BLAKE2b-256 79bdcea91b372dc196e2dfd90811aa3b5efe0e86ffa96280585b53dc5030ad5b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for tdg_connector_python-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 70e0676f95551fff4c69ffff7433d4c84dc5b5704672141fb341d68bd574b902
MD5 860fe434b12f2b0cdbc1fcc312bb019f
BLAKE2b-256 aef8d2fe864213cb7ddc13da00464d016d225b3a6eef678bd075f8b3593d6d1e

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