Append Hygiene SDK
Append Hygiene SDK provides a library of classes for working with On-Demand API in your Python code.
Requirements
- Python 3.6+
- Must be logged into the private VPN.
Installation
pip install append-hygiene-sdk
Environment Variables
ONDEMAND_URL: On-Demand Base URL.
Examples
Hygiene
import time
from dotenv import load_dotenv
from append_hygiene_sdk import Hygiene
load_dotenv()
# Step 1: Create the Hygiene object
my_hygiene = Hygiene()
# Step 2: Add your custom payload to the Hygiene object and execute the hygiene push
my_hygiene.push_hygiene(
payload={
"filepath": "s3://bucket-name/folder1/folder2/file1.csv",
"result_path": "s3://bucket-name/folder1/folder2/",
"verification": False,
"has_header": True,
"email_column_number": 1,
"omit_suppressions": False,
"ignore_duplicates": False,
"suppression_types": [
"trap",
"high_complainer",
"low_complainer"
],
"on_success_uri": "mailto:[EMAIL]?subject=[SUCCESS SUBJECT LINE]",
"on_error_uri": "mailto:[EMAIL]?subject=[FAILED SUBJECT LINE]",
"callback_context": "{\"clientID\": \"123\"}"
}
)
# Step 3: Wait for the hygiene to complete
while my_hygiene.hygiene_status(my_hygiene.hygiene_id):
time.sleep(10)
print("Waiting for Hygiene to complete...")
Append
import time
from dotenv import load_dotenv
from append_hygiene_sdk import Append
load_dotenv()
# Step 1: Create the Append object
my_append = Append()
# Step 2: Add your custom payload to the Append object and execute the Append push
my_append.push_append(
payload={
"filepath": "s3://bucket-name/folder1/folder2/file1.csv",
"has_header": True,
"identifier_columns": {
"first_name": 1,
"last_name": 2,
"address": 4,
"zip5": 8
},
"individual_match": True,
"household_match": False,
"append_fields": [
"email"
],
"hygiene_and_verification": False,
"verification": False,
"results_per_row": 1,
"prioritize_individual_email": True,
"additional_append_fields": {},
"hide_results": False,
"unique_emails": True,
"suppression_types": [
"bad_domain",
"bad_extension",
"bad_word",
"catch_all",
"unsub",
"trap",
"high_complainer",
"low_complainer",
"bad_format",
"invalid",
"unknown",
"unpreferred_domain"
],
"apply_address_correction": False,
"ac_with_history": False,
"append_ac_columns": False,
"raw_email": False,
"result_path": "s3://bucket-name/folder1/folder2/",
"on_success_uri": "mailto:[EMAIL]?subject=[SUCCESS SUBJECT LINE]",
"on_error_uri": "mailto:[EMAIL]?subject=[FAILED SUBJECT LINE]",
"callback_context": "{\"clientID\": \"123\"}"
}
)
# Step 3: Wait for the Append to complete
while my_append.append_status(my_append.append_id):
time.sleep(10)
print("Waiting for Hygiene to complete...")
CHANGELOG
[0.2.1] - 2020-06-01
- Updated package to include Python 3.6+
[0.2.0] - 2020-06-01
- Added
Appendobject to the SDK. - Added
push_appendmethod to the Append class. - Added
append_statusmethod to the Append class. - Updated
README.mdto include the Append SDK.
[0.1.1] - 2020-06-01
- Updated pypi description
[0.1.0] - 2020-05-31
- Added
Hygieneobject to the SDK. - Added
push_hygienemethod to Hygiene class. - Added
hygiene_statusmethod to Hygiene class. - Updated
README.md
Metadata
Release files for append-hygiene-sdk 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| append-hygiene-sdk-0.2.1.tar.gz | 5.0 kB | Without provenance | Details for append-hygiene-sdk-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| append_hygiene_sdk-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for append_hygiene_sdk-0.2.1-py3-none-any.whl |
Total release size: 10.8 kB
Release files / append-hygiene-sdk-0.2.1.tar.gz
| Download URL | append-hygiene-sdk-0.2.1.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62d3136a4a64b10c9961b0be9c868b0205e1d0f81c8683e5e05e0d7c5bb4d8f6
|
|
BLAKE2b-256 checksum How to use checksums |
dbd129d05782a5355f03bfbb078deae8ae9722cdb00dadca99987e6cac2529c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.4 Darwin/21.6.0
|
Release files / append_hygiene_sdk-0.2.1-py3-none-any.whl
| Download URL | append_hygiene_sdk-0.2.1-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9cfdfc86a649483c3f9e5119a8c4b63e7572e6f5c4ced6aa10952a585f51489d
|
|
BLAKE2b-256 checksum How to use checksums |
e6d84673792d27e3b451370108f173a1dc618829766ca34126b3af837d041a0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.4 Darwin/21.6.0
|
Security for append-hygiene-sdk 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.