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
Metadata
Release files for forager-service 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| forager_service-0.1.2.tar.gz | 16.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| forager_service-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.6 kB
Release files / forager_service-0.1.2.tar.gz
| Download URL | forager_service-0.1.2.tar.gz |
|---|---|
| Size | 16.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a018e6a736ba5d5688d6bcd7a990b53949adf02ec04243cbcb772330bcd5bf4a
|
|
BLAKE2b-256 checksum How to use checksums |
014aa7e4f4d26588f8c2aac558e4dd808a2de0cc9d7eef179e963aed45c173f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.0 CPython/3.10.0 Windows/10
|
Release files / forager_service-0.1.2-py3-none-any.whl
| Download URL | forager_service-0.1.2-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d56b379f02fcffbbf5d1088089708ef6ded5e7bd975588f8041155560f28c6bf
|
|
BLAKE2b-256 checksum How to use checksums |
b1c9480d8b2fae8dc76abe28c81d54bbcf7dab5474a45a67fa772e00e1018ace
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.0 CPython/3.10.0 Windows/10
|
Security for forager-service 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.