Skip to content

Commit

Permalink
Merge branch 'release/2.0.0'
Browse files Browse the repository at this point in the history
* release/2.0.0:
  bump to 2.0.0
  rebranded to emailable
  • Loading branch information
eberquist committed Mar 16, 2021
2 parents 6a43c66 + 664a412 commit bc6ed04
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 41 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
# Python egg metadata, regenerated from source files by setuptools.
/*.egg-info
/*.egg
/*.eggs

/build/
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020 Blaze Verify. https://blazeverify.com
Copyright (c) 2020 Emailable. https://emailable.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
36 changes: 17 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,43 @@
# Blaze Verify Python Library
# Emailable Python Library

[![Version](https://img.shields.io/pypi/v/blazeverify.svg)](https://pypi.org/project/blazeverify/)
[![Build Status](https://travis-ci.com/blazeverify/blazeverify-python.svg)](https://travis-ci.com/blazeverify/blazeverify-python)
[![Maintainability](https://api.codeclimate.com/v1/badges/dcb962c96795974051fc/maintainability)](https://codeclimate.com/github/blazeverify/blazeverify-python/maintainability)
[![Version](https://img.shields.io/pypi/v/emailable.svg)](https://pypi.org/project/emailable/)
[![Build Status](https://travis-ci.com/emailable/emailable-python.svg)](https://travis-ci.com/emailable/emailable-python)
[![Maintainability](https://api.codeclimate.com/v1/badges/dcb962c96795974051fc/maintainability)](https://codeclimate.com/github/emailable/emailable-python/maintainability)

**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.
This is the official python wrapper for the Emailable API.

## Documentation

See the [Python API docs](https://blazeverify.com/docs/api/?python).
See the [Python API docs](https://emailable.com/docs/api/?python).

## Installation

```shell
pip install blazeverify
pip install emailable
```

## Usage

The library needs to be configured with your account's API key which is available in your [Blaze Verify Dashboard](https://app.blazeverify.com/api).
The library needs to be configured with your account's API key which is available in your [Emailable Dashboard](https://app.emailable.com/api).

### Setup

```python
import blazeverify
import emailable

client = blazeverify.Client('live_...')
client = emailable.Client('live_...')
```

### Verification

```python
# verify an email address
response = client.verify('evan@blazeverify.com')
response = client.verify('evan@emailable.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)
client.verify('evan@emailable.com', smtp=False, accept_all=True, timeout=25)
```

#### Slow Email Server Handling
Expand All @@ -66,14 +64,14 @@ response.message
#### Start a batch

```python
emails = ['evan@blazeverify.com', 'support@blazeverify.com', ...]
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, callback_url='https://blazeverify.com/')
response = client.batch(emails, callback_url='https://emailable.com/')
```

#### Get the status / results of a batch
Expand All @@ -93,7 +91,7 @@ response.message

# if your batch is complete
response.emails
=> [{'email': 'evan@blazeverify.com', 'state': 'deliverable'...}, {'email': 'support@blazeverify.com', 'state': 'deliverable'...}...]
=> [{'email': 'evan@emailable.com', 'state': 'deliverable'...}, {'email': 'support@emailable.com', 'state': 'deliverable'...}...]

# get the counts
response.total_counts
Expand All @@ -107,9 +105,9 @@ response.reason_counts
Tests can be run with the following command:

```shell
python setup test
python setup.py test
```

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/blazeverify/blazeverify-python.
Bug reports and pull requests are welcome on GitHub at https://github.com/emailable/emailable-python.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.1
2.0.0
File renamed without changes.
2 changes: 1 addition & 1 deletion blazeverify/client.py → emailable/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Client:

def __init__(self, api_key):
self.api_key = api_key
self.base_url = 'https://api.blazeverify.com/v1/'
self.base_url = 'https://api.emailable.com/v1/'

def verify(self, email, smtp=True, accept_all=False, timeout=None):
params = {
Expand Down
File renamed without changes.
File renamed without changes.
18 changes: 9 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@
version = version_file.read().strip()

setuptools.setup(
name="blazeverify",
name="emailable",
version=version,
author="Blaze Verify",
author_email="support@blazeverify.com",
description="This is the official python wrapper for the Blaze Verify API.",
author="Emailable",
author_email="support@emailable.com",
description="This is the official python wrapper for the Emailable API.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/blazeverify/blazeverify-python",
url="https://github.com/emailable/emailable-python",
license="MIT",
keywords="blazeverify email verification",
keywords="emailable email verification",
packages=setuptools.find_packages(),
install_requires = [
'requests'
],
test_suite='nose.collector',
tests_require=['nose'],
project_urls={
"Bug Tracker": "https://github.com/blazeverify/blazeverify-python/issues",
"Documentation": "https://blazeverify.com/docs/api",
"Source Code": "https://github.com/blazeverify/blazeverify-python",
"Bug Tracker": "https://github.com/emailable/emailable-python/issues",
"Documentation": "https://emailable.com/docs/api?python",
"Source Code": "https://github.com/emailable/emailable-python",
},
classifiers=[
"Programming Language :: Python :: 3",
Expand Down
20 changes: 10 additions & 10 deletions tests/test_client.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
from unittest import TestCase
import blazeverify
import emailable

class TestClient(TestCase):
def setUp(self):
self.client = blazeverify.Client('test_7aff7fc0142c65f86a00')
self.response = self.client.verify('johndoe+tag@blazeverify.com')
self.client = emailable.Client('test_7aff7fc0142c65f86a00')
self.response = self.client.verify('johndoe+tag@emailable.com')

def test_invalid_api_key(self):
client = blazeverify.Client('test_7aff7fc0141c65f86a00')
client = emailable.Client('test_7aff7fc0141c65f86a00')
self.assertRaises(
blazeverify.AuthError,
emailable.AuthError,
client.verify,
'evan@blazeverify.com'
'evan@emailable.com'
)

def test_missing_api_key(self):
self.client.api_key = None
self.assertRaises(
blazeverify.AuthError,
emailable.AuthError,
self.client.verify,
'evan@blazeverify.com'
'evan@emailable.com'
)

def test_verify_returns_response(self):
self.assertIsInstance(self.response, blazeverify.Response)
self.assertIsInstance(self.response, emailable.Response)

def test_verification_role(self):
response = self.client.verify('[email protected]')
Expand Down Expand Up @@ -51,7 +51,7 @@ def test_verification_name_and_gender(self):

def test_batch_creation(self):
response = self.client.batch(
['evan@blazeverify.com', 'jarrett@blazeverify.com']
['evan@emailable.com', 'jarrett@emailable.com']
)
self.assertIsNotNone(response.id)

Expand Down

0 comments on commit bc6ed04

Please sign in to comment.