A simple wrapper for the Dependency Track REST API.
Project description
A simple wrapper for the Dependency Track REST API.
Usage
Installation
This project is available as Python package on PyPi.org.
Install DependencyTrack and required dependencies:
pip install dependencytrack requests
Using the API
Get a REST API token either from the Fossology server under “User->Edit user account” or generate a token using the method available in this library:
from dependencytrack import DependencyTrack url = 'http://10.0.0.1:8080' api_key = 'YRlAeOAb0uXT7dTGrfsvnGxjxZSF0XbO' dt = DependencyTrack(url, api_key) dt.list_projects() dt.get_project_property('ab36ead0-c7b0-47f5-89ac-7f92a0bbe12e') dt.list_components() dt.get_project_dependency('ab36ead0-c7b0-47f5-89ac-7f92a0bbe12e') dt.get_component_dependency('db6157c2-f0a3-447c-902d-aecd360958bd') dt.list_concise_licenses()[0] dt.get_license('MIT') dt.search('dnsmasq-2.0')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dependency-track-0.0.2.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for dependency_track-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc9ca85c9da53e90bb415a3c825c0b8c4e6dc0364c3b7b1be3da81bcf119c860 |
|
MD5 | 91edfd20dc7d4a6f0f8f9fc6703c3dfb |
|
BLAKE2b-256 | a3403f5d51ca2c086b8e7527bbc5efa87cc9114c203537f5b23391d290b82b96 |