Emailable Python Library
This is the official python wrapper for the Emailable API.
Documentation
See the Python API docs.
Installation
pip install emailable
Usage
Authentication
The Emailable API requires either an API key or an access token for authentication. API keys can be created and managed in the Emailable Dashboard.
An API key can be set globally for the Emailable client:
client = emailable.Client('your_api_key')
Or, you can specify an api_key or an access_token with each request:
# set api_key at request time
client.verify(api_key='your_api_key')
# set access_token at request time
client.verify(access_token='your_access_token')
Timeouts
By default, the client waits up to 30 seconds to connect and up to 60 seconds
for the server to send data before raising emailable.ClientError. The read
timeout applies to each wait between bytes, not to the whole response. Both
must be positive numbers of seconds. To change them for every client:
emailable.Client.open_timeout = 10
emailable.Client.read_timeout = 45
The read timeout is separate from the timeout argument to verify, which
tells the API how long to spend verifying before returning a 249 response.
Verification
# verify an email address
response = client.verify('evan@emailable.com')
response.state
=> 'deliverable'
# additional parameters are available. see API docs for more info.
client.verify('evan@emailable.com', 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('slow@example.com')
response.status_code
=> 249
response.message
=> 'Your request is taking longer than normal. Please send your request again.'
Batch Verification
Start a batch
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, {'url': 'https://emailable.com/'})
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
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 ...}
Development
Tests can be run with the following command:
pytest
Cutting a Release
Run make release VERSION=x.y.z on an up to date master with a clean tree,
then git push --follow-tags. It runs the tests, bumps VERSION, commits,
and tags x.y.z. Pushing the tag triggers the release workflow, which
publishes to PyPI and creates the GitHub release.
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/emailable/emailable-python.
Metadata
Release files for emailable 3.2.0
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 |
|---|---|---|---|---|
| emailable-3.2.0.tar.gz | 6.4 kB | With provenance | Details for emailable-3.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| emailable-3.2.0-py3-none-any.whl | Python 3 | none | any | Details for emailable-3.2.0-py3-none-any.whl |
Total release size: 14.3 kB
Release files / emailable-3.2.0.tar.gz
| Download URL | emailable-3.2.0.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8cacc57df8a9693f3616d3d502af1bfaf873900a1618040a9d3e5cb30cda4f48
|
|
BLAKE2b-256 checksum How to use checksums |
7a44ffa6c0fda0a51182c89965b12ab19a4b4da99a25273d93f2df087b42fe77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logRelease files / emailable-3.2.0-py3-none-any.whl
| Download URL | emailable-3.2.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3cce2f40bd271b3d9c94bc4cf4ef7a5c937e61c62380ef9b91acccb3855822b6
|
|
BLAKE2b-256 checksum How to use checksums |
a2b710c454587b26d5de974044210769ad8a991988cd07392f91dec4fc5fbfd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logSecurity for emailable 3.2.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for emailable-3.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.
Transparency logA 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.