
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
This is the backport to python 2.7 of the official python wrapper for the Emailable API.
This is the backport to Python 2.7 of the Emailable's official python wrapper for the Emailable API.
See the Python API docs.
pip install emailable-backport
The library needs to be configured with your account's API key which is available in your Emailable Dashboard.
import emailable
client = emailable.Client('live_...')
# verify an email address
response = client.verify('evan@emailable.com')
response.state
=> 'deliverable'
# additional parameters are available. see API docs for additional info.
client.verify('evan@emailable.com', smtp=False, accept_all=True, timeout=25)
Some email servers are slow to respond. As a result, the timeout may be reached before we are able to complete the verification process. If this happens, the verification will continue in the background on our servers. We recommend sleeping for at least one second and trying your request again. Re-requesting the same verification with the same options will not impact your credit allocation within a 5 minute window.
A slow response will return with a 249 status code.
response = client.verify('slow@example.com')
response.status_code
=> 249
response.message
=> 'Your request is taking longer than normal. Please send your request again.'
emails = ['evan@emailable.com', 'support@emailable.com', ...]
response = client.batch(emails)
response.id
=> '5cff27400000000000000000'
# you can optionally pass in a callback url that we'll POST to when the
# batch is complete.
response = client.batch(emails, callback_url='https://emailable.com/')
To get the status of a batch call batch_status
with the batch's id. If your batch is still being processed, you will receive a message along with the current progress of the batch. When a batch is completed, you can access the results in the emails
attribute.
response = client.batch_status('5cff27400000000000000000')
# if your batch is still running
response.processed
=> 1
response.total
=> 2
response.message
=> 'Your batch is being processed.'
# if your batch is complete
response.emails
=> [{'email': 'evan@emailable.com', 'state': 'deliverable'...}, {'email': 'support@emailable.com', 'state': 'deliverable'...}...]
# get the counts
response.total_counts
=>{'deliverable': 2, 'undeliverable': 0 ...}
response.reason_counts
=>{'accepted_email': 2, 'rejected_email': 0 ...}
Tests can be run with the following command:
poetry run tox
Bug reports and pull requests are welcome on GitHub at https://github.com/bernardoduarte/emailable-python-backport.
FAQs
This is the backport to python 2.7 of the official python wrapper for the Emailable API.
We found that emailable-backport demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.