API library for the NeverBounce email verification service.
Project description
Python API wrapper library for the NeverBounce email verification service.
Installation
$ pip install neverbounce
The only dependency is the requests library.
Usage
Sign up to get an API username and key and 1000 free monthly verifications. The free account supports only single verifications.
Single verification
>>> from neverbounce import NeverBounce
>>> neverbounce = NeverBounce('my_api_username', 'my_api_key')
>>> verified = neverbounce.verify('martin@martinkosir.net')
>>> print(str(verified))
martin@martinkosir.net: valid
>>> print(verified.email, verified.result_text, verified.result_code, verified.is_valid)
martin@martinkosir.net valid 0 True
Bulk verification
To use this features you need to configure a payment method in NeverBounce account settings.
>>> from neverbounce import NeverBounce
>>> neverbounce = NeverBounce('my_api_username', 'my_api_key')
Create the job and get it’s id:
>>> emails = ['some.email@example.com', 'john.smith@gmail.com']
>>> job_id = neverbounce.create_job(emails).job_id
Periodically check the status of verification job:
>>> job_status = neverbounce.check_job(job_id)
Use the results generator to iterate over verified emails if the job has been completed:
>>> if job_status.is_completed:
... for verified in neverbounce.results(job_id):
... print(verified.email, verified.result_text, verified.result_code, verified.is_valid)
some.email@example.com invalid 1 False
john.smith@gmail.com invalid 1 False
Account information
Get the information about your API account:
>>> from neverbounce import NeverBounce
>>> neverbounce = NeverBounce('my_api_username', 'my_api_key')
>>> account = neverbounce.account()
>>> print(str(account))
Credits: 999, Jobs Completed: 22, Jobs Processing: 0
>>> print(account.credits, account.jobs_completed, account.jobs_processing)
999 22 0
Documentation
Build status
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file neverbounce-0.2.0.tar.gz.
File metadata
- Download URL: neverbounce-0.2.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fc3634f1f559e285aa2825e24d509dee643064d1cfec2bc118a128468350260
|
|
| MD5 |
83d44c04d277211c5b2822ed28c579e4
|
|
| BLAKE2b-256 |
668ec577a43a2cd7c07b249d96b2a3fad522e25345c77f26285a4be81ba0b990
|
File details
Details for the file neverbounce-0.2.0-py2.py3-none-any.whl.
File metadata
- Download URL: neverbounce-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
845d2b432d05a3b138e2bdf15a3f175417f01a00fe7bad768866881a30134a1e
|
|
| MD5 |
3050f7560ca55fe00bd2c0ee70101320
|
|
| BLAKE2b-256 |
aaa90811a5afdb4dfbc49e1f2a31cd727f7a0a11a9dcf16cb26047299c7ee15f
|