病毒
cloudmersive-virus-api-client的Python项目详细描述
cloudmersive_病毒_api_客户端
Cloudmersive病毒扫描API允许您扫描文件和内容中的病毒,并识别内容的安全问题。在
这个Python包为Cloudmersive Anti-Virus Scan API提供了一个本机API客户机
- API版本:v1
- 软件包版本:3.0.1
- 生成包:io.swagger.codegen.语言.PythonClientCodegen在
要求
Python 2.7和3.4+
安装和使用
pip安装
如果python包托管在Github上,则可以直接从Github安装
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(您可能需要使用根权限运行pip
:sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
)
然后导入包:
^{pr2}$设置工具
通过Setuptools安装。在
python setup.py install --user
(或sudo python setup.py install
为所有用户安装软件包)
然后导入包:
importcloudmersive_virus_api_client
入门
请按照installation procedure操作,然后运行以下命令:
from__future__importprint_functionimporttimeimportcloudmersive_virus_api_clientfromcloudmersive_virus_api_client.restimportApiExceptionfrompprintimportpprint# Configure API key authorization: Apikeyconfiguration=cloudmersive_virus_api_client.Configuration()configuration.api_key['Apikey']='YOUR_API_KEY'# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed# configuration.api_key_prefix['Apikey'] = 'Bearer'# create an instance of the API classapi_instance=cloudmersive_virus_api_client.ScanApi(cloudmersive_virus_api_client.ApiClient(configuration))input_file='/path/to/file.txt'# file | Input file to perform the operation on.try:# Scan a file for virusesapi_response=api_instance.scan_file(input_file)pprint(api_response)exceptApiExceptionase:print("Exception when calling ScanApi->scan_file: %s\n"%e)
API终结点文档
所有uri都是相对于https://api.cloudmersive.com
Class | Method | HTTP request | Description |
---|---|---|---|
ScanApi | scan_file | POST /virus/scan/file | Scan a file for viruses |
ScanApi | scan_file_advanced | POST /virus/scan/file/advanced | Advanced Scan a file for viruses |
ScanApi | scan_website | POST /virus/scan/website | Scan a website for malicious content and threats |
模型文档
授权文件
阿皮基
- Type:API密钥
- API key参数名:Apikey
- Location:HTTP头
作者
- 项目
标签: