Skip to content

Commit 3eeef2d

Browse files
committed
updated setup, added setup.cfg, refactored metadata
1 parent d553ab2 commit 3eeef2d

7 files changed

Lines changed: 115 additions & 5 deletions

File tree

File renamed without changes.

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include docs/*
2+
include *.rst *.txt

README.rst

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
ThreadFix Pro API
2+
*****************
3+
4+
A Python module to assist with the `ThreadFix Professional <https://www.threadfix.it/>`__ RESTFul API to administer scan artifacts and overall ThreadFix vulnerability administration.
5+
6+
Quick Start
7+
~~~~~~~~~~~
8+
9+
Several quick start options are available:
10+
11+
- Install with pip: ``pip install threadfixproapi``
12+
- Build locally: ``python setup.py install``
13+
- `Download the latest release <https://github.com/denimgroup/threadfix-python-api/releases/new/>`__.
14+
15+
Example
16+
~~~~~~~
17+
18+
::
19+
20+
# import the package
21+
from threadfixproapi import threadfixpro
22+
23+
# setup threadfix connection information
24+
host = 'https://127.0.0.1:8443/threadfix/'
25+
api_key = 'your_api_key_from_threadfix_professional'
26+
27+
# initialize threadfix pro api module
28+
tfp = threadfixpro.ThreadFixProAPI(host, api_key)
29+
30+
# If you need to disable certificate verification.
31+
# tfp = threadfixpro.ThreadFixProAPI(host, api_key, verify_ssl=False)
32+
33+
# List your threadfix pro teams
34+
teams = tfp.list_teams()
35+
if teams.success:
36+
print("{}".format(teams.data))
37+
38+
for team in teams.data:
39+
print(team['name']) # Print the name of each team
40+
else:
41+
print("ERROR: {}".format(teams.message))
42+
43+
Supporting information for each method available can be found in the `documentation <https://github.com/denimgroup/threadfix-python-api>`__.
44+
45+
Bugs and Feature Requests
46+
~~~~~~~~~~~~~~~~~~~~~~~~~
47+
48+
Found something that doesn't seem right or have a feature request? `Please open a new issue <https://github.com/denimgroup/threadfix-python-api/issues/new>`__.
49+
50+
Copyright and License
51+
~~~~~~~~~~~~~~~~~~~~~
52+
.. image:: https://img.shields.io/github/license/denimgroup/threadfix-python-api.svg?style=flat-square
53+
54+
- Copyright 2020 Denim Group, Inc.

ThreadFixPythonApi/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
from .threadfixpro import ThreadFixProAPI
2+
__version__ = '1.0.7'

ThreadFixPythonApi/threadfixpro.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33

4-
__author__ = "Brandon Spruth (brandon.spruth2@target.com), Jim Nelson (jim.nelson2@target.com),"
4+
__author__ = "Brandon Spruth (bspruth@gmail.com), Jim Nelson (jim.nelson2@target.com),"
55
__copyright__ = "(C) 2018 Target Brands, Inc."
66
__contributors__ = ["Brandon Spruth", "Jim Nelson", "Evan Schlesinger"]
77
__status__ = "Production"

setup.cfg

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[bdist_wheel]
2+
universal = 1
3+
4+
[metadata]
5+
license_file = LICENSE.txt
6+
7+
[egg_info]
8+
tag_build =
9+
tag_date = 0
10+

setup.py

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,52 @@
1-
from distutils.core import setup
1+
#!/usr/bin/env python
22

3+
import os
4+
import sys
5+
6+
from ThreadFixPythonApi import __version__ as version
7+
8+
try:
9+
from setuptools import setup
10+
except ImportError:
11+
from distutils.core import setup
12+
13+
with open('README.rst', 'r') as f:
14+
readme = f.read()
15+
16+
# Publish helper
17+
if sys.argv[-1] == 'build':
18+
os.system('python setup.py sdist bdist_wheel')
19+
sys.exit(0)
20+
21+
if sys.argv[-1] == 'install':
22+
os.system('python setup.py sdist --formats=zip')
23+
sys.exit(0)
24+
325
setup(
4-
name='ThreadFixPythonAPI',
5-
version='1.0.7',
26+
name='threadfixproapi',
627
packages=['ThreadFixPythonApi', '_utils',],
28+
version=version,
29+
description='Python library enumerating the ThreadFix Professional RESTFul API.',
30+
long_description='A python implementation of ThreadFix\'s API for easier use with python. Built off of original work by (c) 2018 Target Brands, Inc.',
31+
author='Dan Cornell',
32+
author_email='dancornell@gmail.com',
33+
url='https://github.com/denimgroup/threadfix-python-api',
34+
download_url='https://github.com/denimgroup/threadfix-python-api/tarball/' + version,
735
license='MIT',
8-
long_description='A python implementation of ThreadFix\'s API for easier use with python. Built off of original work by (c) 2018 Target Brands, Inc.'
36+
zip_safe=True,
37+
install_requires=['requests'],
38+
keywords=['threadfix', 'api', 'security', 'software', 'denim group', 'sast', 'dast'],
39+
classifiers=[
40+
'Development Status :: 4 - Beta',
41+
'Intended Audience :: Developers',
42+
'Natural Language :: English',
43+
'License :: OSI Approved :: MIT License',
44+
'Topic :: Software Development',
45+
'Topic :: Software Development :: Libraries :: Python Modules',
46+
'Programming Language :: Python :: 2',
47+
'Programming Language :: Python :: 2.7',
48+
'Programming Language :: Python :: 3.0',
49+
'Programming Language :: Python :: 3.6',
50+
'Programming Language :: Python :: 3.7',
51+
]
952
)

0 commit comments

Comments
 (0)