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.1
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")
client = initializer.client
Once initialized somewhere in the code you can get instances in different places without additional initialization
client = ClientInitializer().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.1.tar.gz
(16.5 kB
view details)
Built Distribution
File details
Details for the file forager_forward-0.1.1.tar.gz
.
File metadata
- Download URL: forager_forward-0.1.1.tar.gz
- Upload date:
- Size: 16.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.0 CPython/3.10.0 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f255e29c81489620133b2532244fe5c34addddc4373dc9e190c283bc4634387 |
|
MD5 | cfba997b896cbbb734c818856bafc687 |
|
BLAKE2b-256 | ad12ea6530436867a8882050cae87065be3dd79cf87a403e969bd0d808a105bf |
File details
Details for the file forager_forward-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: forager_forward-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.0 CPython/3.10.0 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82ba3da8bb5326417c15cfa53fb1f0a2a5cac8a1f66e355e65fbb1b1ad319d85 |
|
MD5 | 24193533552180824fecb1e6a7145790 |
|
BLAKE2b-256 | 1d5c0fcef07a0350365e1df23793a13e16c35021efca6643ac5cb0f13ee2b6c1 |