Hunter.io v2 api implementation
Project description
Forager clients and services
A python wrapper for the Hunter.io v2 api as a client. Email validation service.
Installation
Requirements
- Python 3.10
- httpx
To install
pip install forager_forward==0.1.0
Usage
Service supports next method from Hunter.io v2 api
- domain_search (with async adomain_search)
- email_finder (with async aemail_finder)
- verify_email (with async averify_email)
- email_count (with async aemail_count)
Additionally, service supports crud methods for locally storing data
How to use service
Import service and instantiate it once
from forager_forward.client_initializer import ClientInitializer
initializer = ClientInitializer()
initializer.initialize_client("api_key_got_from_hunter")
initializer.initialize_async_client("api_key_got_from_hunter")
client = initializer.client
async_client = initializer.async_client
Once initialized somewhere in the code you can get instances in different places without additional initialization
client = ClientInitializer().client
async_client = ClientInitializer().async_client
Search addresses for a given domain
client.domain_search("www.brillion.com.ua")
Or pass company name
client.domain_search(company="Brillion", limit=20, seniority="junior")
Find email address
client.email_finder(compayny="pmr", full_name="Sergiy Petrov", raw=True)
Check email deliverabelity
client.email_verifier("a@a.com")
All data can be stored in Storage class instance. It has its own crud methods, and it is Singleton.
from forager_forward.common.storage import Storage
storage = Storage()
storage.create(some_key, some_value)
storage.update(some_key, some_value)
some_variable = storage.read(some_key)
storage.delete(some_key)
To validate emails and store validation result use email_validation_service.
from forager_forward.app_services.email_validation_service import EmailValidationService
email_validator = EmailValidationService()
email_validator.create_email_record("some_email@company.com")
email_validator.read("another@company.com")
Tests
To run test firstly you need to install test dependency, then run
pytest -cov
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
forager_forward-0.1.0.tar.gz
(15.9 kB
view hashes)
Built Distribution
Close
Hashes for forager_forward-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 499c1770ad12adeaa15862d28075d498a5ccd034391dbe122a55025ebcaa1c34 |
|
MD5 | 7f5874d45b16ce51e7bd634e01d041ec |
|
BLAKE2b-256 | ddeef1a7e6d15e35e282082c0131a5f78717d449efa1fd2916d95abf2acb04f3 |