Python客户端库,用于域名信誉API。
项目描述
概述
Python语言编写的域名信誉API客户端库。
最小Python版本是3.6。
安装
pip install domain-reputation
示例
完整API文档可在此处找到
创建新的客户端
from domainreputation import *
client = Client('Your API key')
执行基本请求
# Get DNS records for a domain name.
response = client.get('youtube.com')
print(response)
# Get raw API response in XML format
raw_result = client.get_raw('bbc.com',
output_format=Client.XML_FORMAT)
高级用法
额外请求参数
result = client.get(
'samsung.com',
Client.MODE_FULL)
响应模型概述
Response:
- mode: str
- reputation_score: float
- test_results: [TestResult]
- test: str
- test_code: int
- warnings: [str]
- warning_codes: [int]
示例响应
{
'mode': 'full',
'reputation_score': 81.16,
'test_results':
[
{
"test": "Name servers configuration meets best practices",
"testCode": 76,
"warnings": [
"Some name servers are located on a single ASN: \
ns44.domaincontrol.com - AS44273, ns43.domaincontrol.com - AS44273"
],
"warningCodes": [
1013
]
},
{
"test": "Mail servers configuration check",
"testCode": 80,
"warnings": [
"AAAA records not configured for mail servers",
"SPF record not configured",
"DMARC is not configured"
],
"warningCodes": [
5007,
5015,
5016
]
},
{
"test": "Malware databases check",
"testCode": 82,
"warnings": [
"Status: dangerous"
],
"warningCodes": [
4001
]
},
{
"test": "SSL Certificate configuration",
"testCode": 89,
"warnings": [
"No SSL certificates found"
],
"warningCodes": [
6023
]
}
]
}
变更日志
1.0.0 (2021-10-25)
首次发布
项目详情
下载文件
下载适合您平台的应用程序。如果您不确定选择哪一个,请了解更多关于 安装包 的信息。
源分发
domain-reputation-1.0.0.tar.gz (9.1 kB 查看散列值)
构建分发
关闭
domain-reputation-1.0.0.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 1d7e3bec24f5e98bd81a2f3da69fa3ad8e74b5a2b85e4d5c8cb6806e885799a1 |
|
MD5 | d2a3fe8f90c0be4c633ef1e73ed0f84b |
|
BLAKE2b-256 | c91d2d9662382f8619addfcaa139383fcc13a26b9dd1e2412caa0575247aa189 |
关闭
domain_reputation-1.0.0-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 4f47d473fd50cfa39da93c2b8fbf5aee4c49a2768bfbd56200e4c9022dd54118 |
|
MD5 | f2e6d77732b8b4a569fbafbf61533283 |
|
BLAKE2b-256 | c9ad64fc4afcacb74263aafcd68a6550056530f2e4ff9c0092d8b139e712b746 |