Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

Package for using the Synopsys Black Duck Hub REST API.

Project description


The hub-rest-api-python provides Python bindings for Hub REST API.

To use

pip install blackduck
from blackduck.HubRestApi import HubInstance
import json

username = "sysadmin"
password = "your-password"
urlbase = ""

hub = HubInstance(urlbase, username, password, insecure=True)

projects = hub.get_projects()

print(json.dumps(projects.get('items', [])))


Example code showing how to do various things can be found in the examples folder.


You should be using virtualenv, virtrualenvwrapper to make things easy on yourself.

Ref: Packaging Python Projects Tutorial

Build the blackduck packages

To build both the source distribution package and the wheel package,

pip3 install -r requirements.txt
python3 sdist bdist_wheel

Distribute the package

Requires you have an account on either/both PyPi and Test PyPi AND you must be a package maintainer.

Send a request to or if you want to be listed as a package maintainer.

To PyPi

Upload to PyPi,

twine upload dist/*

Then try installing it from PyPy

pip install blackduck

To Test PyPi

Upload to Test PyPi,

twine upload --repository-url dist/*

Then try installing it from Test PyPy

pip install --index-url blackduck

Install package locally

Do this when testing a new version.

git clone
cd hub-rest-api-python
pip3 install -r requirements.txt
pip3 install .


Using (pytest)[]

git clone
cd hub-rest-api-python
# optional but advisable: create/use virtualenv
# you should have 3.x+, e.g. Python 3.7.0

pip3 install -r requirements.txt
pip3 install .
cd test

Where can I get the latest release?

This package is available on PyPi,

pip3 install blackduck


Documentation for hub-rest-api-python can be found on the base project: Hub REST API Python Wiki

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for blackduck, version 0.0.55
Filename, size File type Python version Upload date Hashes
Filename, size blackduck-0.0.55-py3-none-any.whl (21.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size blackduck-0.0.55.tar.gz (23.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page