This project has been archived by its maintainers, and is no longer receiving any updates.
Blaze Verify Python Library
Blaze Verify is now Emailable! Please switch to using the Emailable client library: https://emailable.com/docs/api?python
This is the official python wrapper for the Blaze Verify API.
Documentation
See the Python API docs.
Installation
pip install blazeverify
Usage
The library needs to be configured with your account's API key which is available in your Blaze Verify Dashboard.
Setup
import blazeverify
client = blazeverify.Client('live_...')
Verification
# verify an email address
response = client.verify('evan@blazeverify.com')
response.state
=> 'deliverable'
# additional parameters are available. see API docs for additional info.
client.verify('evan@blazeverify.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@blazeverify.com', 'support@blazeverify.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://blazeverify.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@blazeverify.com', 'state': 'deliverable'...}, {'email': 'support@blazeverify.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:
python setup test
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/blazeverify/blazeverify-python.
Metadata
Release files for blazeverify 1.0.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 |
|---|---|---|---|---|
| blazeverify-1.0.1.tar.gz | 4.1 kB | Without provenance | Details for blazeverify-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| blazeverify-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for blazeverify-1.0.1-py3-none-any.whl |
Total release size: 9.2 kB
Release files / blazeverify-1.0.1.tar.gz
| Download URL | blazeverify-1.0.1.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a21ac124664dd63a676d6b46e21e717b0a08968d9285abb637353146b3087eef
|
|
BLAKE2b-256 checksum How to use checksums |
631cc90d7d2aa221c244d92309f91516afd91ae89f58f0241727de35e9b96c3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5
|
Release files / blazeverify-1.0.1-py3-none-any.whl
| Download URL | blazeverify-1.0.1-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0f33d89cd3c934f9911cc880441ce7d6a6737cfc37ae720d0492faeabdc0736d
|
|
BLAKE2b-256 checksum How to use checksums |
1b6f5b53eafd2ceb3d569d972165fda4d81dfc3fa18afcb6270901d0c9169af4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5
|
Security for blazeverify 1.0.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.