Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

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

Build status

Release History

Release History

This version
History Node

0.2.0

History Node

0.1.3

History Node

0.1.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
neverbounce-0.2.0-py2.py3-none-any.whl (7.9 kB) Copy SHA256 Checksum SHA256 3.5 Wheel Nov 12, 2016
neverbounce-0.2.0.tar.gz (7.4 kB) Copy SHA256 Checksum SHA256 Source Nov 12, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting