Hunter.io v2 api implementation
Project description
Forager service
A python wrapper for the Hunter.io v2 api with additinal crud service.
Installation
Requirements
- Python 3.10
- httpx
To install
pip install forager_service==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_service.hunter import HunterService
initializer = HunterService()
initializer.initialize_service("api_key_got_from_hunter")
initializer.initialize_async_service("api_key_got_from_hunter")
hunter = initializer.service
async_hunter = initializer.async_service
Once initialized somewhere in the code you can get instances in different places without additional initialization
hunter = HunterService().service
async_hunter = HunterService().async_service
All data stores in crud_service internal storage.
Search addresses for a given domain
hunter.domain_search("www.brillion.com.ua")
Or pass company name
hunter.domain_search(company="Brillion", limit=20, seniority="junior")
Find email address
hunter.email_finder(compayny="pmr", full_name="Sergiy Petrov", raw=True)
Check email deliverabelity
hunter.email_verifier("a@a.com")
CRUD operations can be performed to manipulate received data
from forager_service.app_services.crud_service import CRUDService
crud_service = CRUDService()
crud_service.create("company_email", hunter.domain_search("company.com.ua"))
To collect email validation and other info use email_verify_record_handler. Data will be saved in local storage.
from forager_service.operation_handlers.email_verify_record_handler import EmailVerifyCRUDHandler
email_handler = EmailVerifyCRUDHandler()
email_handler.create_email_record("some_email@company.com")
email_handler.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_service-0.1.2.tar.gz
(16.1 kB
view details)
Built Distribution
File details
Details for the file forager_service-0.1.2.tar.gz
.
File metadata
- Download URL: forager_service-0.1.2.tar.gz
- Upload date:
- Size: 16.1 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 | a018e6a736ba5d5688d6bcd7a990b53949adf02ec04243cbcb772330bcd5bf4a |
|
MD5 | 4915172bf439f5ba2f5fd8b39745bd9f |
|
BLAKE2b-256 | 014aa7e4f4d26588f8c2aac558e4dd808a2de0cc9d7eef179e963aed45c173f0 |
File details
Details for the file forager_service-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: forager_service-0.1.2-py3-none-any.whl
- Upload date:
- Size: 12.6 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 | d56b379f02fcffbbf5d1088089708ef6ded5e7bd975588f8041155560f28c6bf |
|
MD5 | 81f1d30098b1f295e4df3ab07ef5f3a9 |
|
BLAKE2b-256 | b1c9480d8b2fae8dc76abe28c81d54bbcf7dab5474a45a67fa772e00e1018ace |