realvalidation.utils

Module Contents

log
is_dnc_json_response_on_dnc(response)

Determines if json response from DNC API is on dnc

response : dict
dictionary response from RealValidation DNC API
bool
True/False value whether response is on DNC or not
write_rows_to_workbook(rows, workbook_path, workbook_name)

Writes row to workbook

rows : list
list of rows to write to workbook
workbook_path : str
Path to write workbook to
workbook_name : str
Name of the workbook
sanitize_phone(phone, regex='[^0-9]')

Uses regex sub to sanitize characters from phone

phone : str
Phone string to sanitize
regex: regex
Regex to use to sub characters from string. Defaults to r'[^0-9]'
str
sanitized phone string
is_value_phone_identifier(value)

Returns True/False whether value is [Pp]hone or 10 numerical digits only

value : str
Value to determine if phone identifier
bool
True/False value whether phone is a valid identifier
get_cell_values_from_row(row)

Returns string representation of cell values from row in a list

row : list
list of values
list
string representation of cell values from row in a list
enumerate_phone_column_index_from_row(row)

Enumerates the phone column from a given row. Uses Regexs

row : list
list of cell values from row
int
phone column index enumerated from row