Skip to content

A simple wrapper for the Dependency Track REST API.

License

Notifications You must be signed in to change notification settings

Orange-OpenSource/dependency-track-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License Python Version Downloads

A simple wrapper for the Dependency Track REST API. This is fork based on original work of Alvin Chen and his dependency-track library.

Usage

Installation

This project is available as Python package on PyPi.org.
  • Install DependencyTrack and required dependencies:

    pip install dependency-track-client

Using the API

  • Get a REST API key from the DependencyTrack server under "Administration-> Access Management-> Teams":

    from dependencytrack_client 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')

Versioning

Major Version is following [DependencyTrack Major Version](https://github.com/DependencyTrack/dependency-track/releases).

About

A simple wrapper for the Dependency Track REST API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%