电子邮件猎人rest api客户端

email_hunter_python的Python项目详细描述


安装

要求:

  • Python3(因为现在是2015年)

要安装:

pip install email-hunter-python

要更新:

pip install --upgrade email-hunter-python

用法

email_hunter_python支持Email Hunterapi的三种主要方法:searchgenerate,和exist。有两种使用方法 电子邮件:hunter python:

  • 作为一个python库
  • 作为命令行(CLI)工具

使用email_hunter_python python库:

导入客户端并将其实例化:

fromemail_hunterimportEmailHunterClient
client = EmailHunterClient('my_api_key')

您可以搜索:

client.search('google.com')

最多返回100个结果,因此使用偏移量分页:

client.search('google.com',offset=1)

您还可以更改类型(个人或通用):

client.search('google.com',type='personal')

您可以生成:

client.generate('google.com','Sergey','Brin')

你可以检查电子邮件是否存在:

client.exist('sergey@google.com')

使用email_hunter_python作为cli工具:

email_hunter [command name] [api_key] [other args]

命令名为searchgenerateexist,即api密钥 API密钥是否与您的电子邮件猎人帐户关联

其他参数取决于您使用的命令:

--domain       Required for search and generate commands
--offset       Optional, used with search command.
--type         Optional, used with search command
--first_name   Required for generate command
--last_name    Required for generate command
--email        Required for exist command
--file         Path to a CSV to be used with the specified command.
               CSV must have a column for each argument used.

当您要对 同一类型。例如,如果您想查找 一个组织中的几个人您可以执行以下操作:

email_hunter generate [api_key] --file people.csv > emails.csv

其中people.csv看起来像:

domain,first_name,last_name
google.com,larry,page
google.com,sergey,brin
facebook.com,mark,zuckerberg

输出也将采用CSV格式

许可证

版权所有©2015 Alan Vezina

根据MIT许可证(MIT)发布,详细信息请参见许可证文件

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java流/下载文件,无需在Spring Boot中保留内存   kotlin/java是否有类似TryParse()的东西?   java Spring引导找不到用户类型的属性ID   java Spring 2到Spring 3的迁移:一个控制器用于多个视图   java包含多个程序包名为“安卓”的库。支持图样可提取'   java spring JPA是否支持自定义值框架?   java转义出基于文本字段的搜索栏   java AAPT:错误:未找到样式属性“安卓:attr/WindowsPlashCreenBackground”   java从文本文件中读取纬度和经度   java哪里可以找到如何使用排序的示例。顺序ignorecase(),其中nullhandling nulls last用于自定义Spring JPA如何提供查询   尝试使用Dialogflow上的Webhook动态给出响应时,java获取Webhook响应错误(206)   如何在java中替换匹配的字符串?   java模拟数学的最大价值。随机的   java Spring RestTemplate GET请求未给出正确响应   春爪哇。lang.IllegalArgumentException   java系统。load()永远不会发生   java剪辑循环不工作   java如何从maven构建中删除staxapi   java ThreadPoolExecutor的排队行为是否可以自定义,以更喜欢创建新线程而不是排队?