Skip to main content

Package for using the Synopsys Black Duck Hub REST API.

Project description

Overview

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

To use

pip install blackduck
from blackduck.HubRestApi import HubInstance

username = "sysadmin"
password = "your-password"
urlbase = "https://ec2-34-201-23-208.compute-1.amazonaws.com"

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

projects = hub.get_projects()

Build

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,

pip install -r requirements.txt
python3 setup.py 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 gsnyder@synopsys.com or gsnyder2007@gmail.com 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 https://test.pypi.org/legacy/ dist/*

Then try installing it from Test PyPy

pip install --index-url https://test.pypi.org/simple/ blackduck

Install package locally

Do this when testing a new version.

git clone https://github.com/blackducksoftware/hub-rest-api-python.git
cd hub-rest-api-python
pip install -r requirements.txt
pip install .

Test

Using (pytest)[https://pytest.readthedocs.io/en/latest/contents.html]

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

pip install -r requirements.txt
pip install .
cd test
pytest

Where can I get the latest release?

This package is available on PyPi,

pip install blackduck

Documentation

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.

Source Distribution

blackduck-0.0.8.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

blackduck-0.0.8-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file blackduck-0.0.8.tar.gz.

File metadata

  • Download URL: blackduck-0.0.8.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for blackduck-0.0.8.tar.gz
Algorithm Hash digest
SHA256 a4fbccda0875a6eeed20cdb96affada41b9c0936d3fdbf29caac6966f327a4a6
MD5 34266c0746a37b1b6cc1e376bfd83e56
BLAKE2b-256 a729b880b633f2f69147b373b0ac7df8d878971693dc1ea815f70c779b6b78ee

See more details on using hashes here.

File details

Details for the file blackduck-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: blackduck-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.0

File hashes

Hashes for blackduck-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 60b6295d403f3171e2bc743a154d518b530edf45429a7b4be9b10a20cff7dca6
MD5 be5d1e50df2a06b75b86cb895fc1beb4
BLAKE2b-256 8443fa8483cae848fa4f1e504f8cabb8a22848fa17a62255d9f61df03f9ae57c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page