From 6f2d3bfd7322107bfe67fed98dd68baf6c3452e8 Mon Sep 17 00:00:00 2001 From: evan berquist Date: Tue, 16 Mar 2021 15:10:54 -0400 Subject: [PATCH 1/2] rebranded to emailable --- .gitignore | 1 + LICENSE | 2 +- README.md | 36 ++++++++++++-------------- {blazeverify => emailable}/__init__.py | 0 {blazeverify => emailable}/client.py | 2 +- {blazeverify => emailable}/error.py | 0 {blazeverify => emailable}/response.py | 0 setup.py | 18 ++++++------- tests/test_client.py | 20 +++++++------- 9 files changed, 39 insertions(+), 40 deletions(-) rename {blazeverify => emailable}/__init__.py (100%) rename {blazeverify => emailable}/client.py (97%) rename {blazeverify => emailable}/error.py (100%) rename {blazeverify => emailable}/response.py (100%) diff --git a/.gitignore b/.gitignore index ef0c8b0..866e2a7 100644 --- a/.gitignore +++ b/.gitignore @@ -7,5 +7,6 @@ # Python egg metadata, regenerated from source files by setuptools. /*.egg-info /*.egg +/*.eggs /build/ diff --git a/LICENSE b/LICENSE index 1635833..66e81d6 100644 --- a/LICENSE +++ b/LICENSE @@ -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 diff --git a/README.md b/README.md index 813cfc4..4cf5474 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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 @@ -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. diff --git a/blazeverify/__init__.py b/emailable/__init__.py similarity index 100% rename from blazeverify/__init__.py rename to emailable/__init__.py diff --git a/blazeverify/client.py b/emailable/client.py similarity index 97% rename from blazeverify/client.py rename to emailable/client.py index a7a5de7..bc8ff65 100644 --- a/blazeverify/client.py +++ b/emailable/client.py @@ -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 = { diff --git a/blazeverify/error.py b/emailable/error.py similarity index 100% rename from blazeverify/error.py rename to emailable/error.py diff --git a/blazeverify/response.py b/emailable/response.py similarity index 100% rename from blazeverify/response.py rename to emailable/response.py diff --git a/setup.py b/setup.py index 10d6046..c8b9195 100644 --- a/setup.py +++ b/setup.py @@ -7,16 +7,16 @@ 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' @@ -24,9 +24,9 @@ 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", diff --git a/tests/test_client.py b/tests/test_client.py index a127f13..45c780a 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -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('role@example.com') @@ -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) From 664a4129cf2fd4f7a1cf54eb782ed9ae3751f7a7 Mon Sep 17 00:00:00 2001 From: evan berquist Date: Tue, 16 Mar 2021 15:11:32 -0400 Subject: [PATCH 2/2] bump to 2.0.0 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 7dea76e..227cea2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.1 +2.0.0