一个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 packagefromthreadfix_apiimportthreadfix# setup threadfix connection informationhost='http://localhost:8080/threadfix/'api_key='your_api_key_from_threadfix'# instantiate the threadfix api wrappertf=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 rollteams=tf.list_teams()ifteams.success:print(teams.data)# Decoded JSON objectforteaminteams.data:print(team['name'])# Print the name of each teamelse:print('Uh Oh! '+teams.message)
每个可用方法的支持信息都可以在documentation中找到。
错误和功能请求
有bug或功能请求吗?请先查找现有和关闭的问题。如果您的问题或想法尚未解决,please open a new issue。
版权和许可
- 版权所有2015Adam Parsons
- Licensed under MIT。