与简单英特尔平台(SIP)交互的请求的薄包装。

pysip的Python项目详细描述


Pysip

与简单英特尔平台(SIP)交互的请求的薄包装。

用法

import pysip

# Connect to SIP
sip_client = pysip.Client('localhost:4443', '11111111-1111-1111-1111-111111111111', verify=False)

# Example POST request
# Add an indicator and ignore any 409 Conflict error if the indicator already exists.
try:
    data = {'type': 'IP', 'value': '127.0.0.1'}
    sip_client.post('/api/indicators', data)
except pysip.ConflictError:
    pass

# Example GET request
# Get all of the indicators with the "Analyzed" status in "bulk" mode.
indicators = sip_client.get('/api/indicators?status=Analyzed&bulk=true')

# Example PUT request
# Update an indicator's status.
data = {'status': 'Informational'}
result = sip_client.put('/api/indicators/1', data)

# Example DELETE request
# Delete an indicator.
result = sip_client.delete('/api/indicators/1')

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

推荐PyPI第三方库


热门话题
swing Java按钮/网格布局   java列出Google日历中的所有事件   java无效:单击API publisher test按钮后连接到后端时出错   带有内部赋值的java While循环导致checkstyle错误   java为什么trimToSize/ensureCapacity方法提供“公共”级访问?   文件输出流的java问题   ListIterator和并发修改异常的java问题   java如何使用两个URL映射   无法识别使用“./../”构造的字符串java相对路径,为什么?   首次写入remotelyclosedsocket不会触发异常,对吗?JAVA   java OneDrive REST API为文件上载提供了400个无效谓词   Java泛型、集合接口和对象类的问题   OpenSSL Java安全提供程序   jmeter java运行jmx禁用操作