一个api包装器,用于促进与threadfix的交互。


threadfix_api的Python项目详细描述

一个python api包装器,用于促进与ThreadFix的交互。

这个包实现了ThreadFix 2.2.2(4月30日)中提供的所有API功能

快速启动

有几个快速启动选项:

  • 使用pip安装(推荐):pip install threadfix_api
  • Download the latest release
  • 克隆存储库:git clone https://github.com/aparsons/threadfix_api.git

示例

# import the package
from threadfix_api import threadfix

# setup threadfix connection information
host = 'http://localhost:8080/threadfix/'
api_key = 'your_api_key_from_threadfix'

# instantiate the threadfix api wrapper
tf = threadfix.ThreadFixAPI(host, api_key)

# If you need to disable certificate verification, set verify_ssl to False.
# tf = threadfix.ThreadFixAPI(host, api_key, verify_ssl=False)

# You can also specify a local cert to use as client side certificate, as a
# single file (containing the private key and the certificate) or as a tuple
# of both file's path.
# cert=('/path/server.crt', '/path/key')
# tf = threadfix.ThreadFixAPI(host, api_key, cert=cert)

# rock and roll
teams = tf.list_teams()
if teams.success:
    print(teams.data)  # Decoded JSON object

    for team in teams.data:
        print(team['name'])  # Print the name of each team
else:
    print('Uh Oh! ' + teams.message)

每个可用方法的支持信息都可以在documentation中找到。

错误和功能请求

有bug或功能请求吗?请先查找现有和关闭的问题。如果您的问题或想法尚未解决,please open a new issue

推荐PyPI第三方库


热门话题
结论 todotxt casscache mqueue 更糟 modu 瓶用 rclone aaa xpt slicklog 化类 post24 echoices ppjp 闪电式 a2l psmnet cosmicpi bytearray pyamg x264 植入 manga zinc blockdag pywal textblock bbdb dumpdata honeypot dogs mach jss rpython suffix pymatgen 数据仓库 字表 makemigrations clld masher quil comk 名字 ygor chronology 加油机 urequest j1m