Skip to main content

This is the backport to python 2.7 of the official python wrapper for the Emailable API.

Project description

Emailable Python Library Backport

License Python versions Version

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('')
=> 'deliverable'

# additional parameters are available. see API docs for additional info.
client.verify('', smtp=False, accept_all=True, timeout=25)

Slow Email Server Handling

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('')
=> 249
=> 'Your request is taking longer than normal. Please send your request again.'

Batch Verification

Start a batch

emails = ['', '', ...]
response = client.batch(emails)
=> '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='')

Get the status / results of a batch

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
=> 1
=> 2
=> 'Your batch is being processed.'

# if your batch is complete
=> [{'email': '', 'state': 'deliverable'...}, {'email': '', 'state': 'deliverable'...}...]

# get the counts
=>{'deliverable': 2, 'undeliverable': 0 ...}
=>{'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

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

emailable-backport-0.1.0.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

emailable_backport-0.1.0-py2.py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page