Skip to main content

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

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.17.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blackduck-0.0.17-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: blackduck-0.0.17.tar.gz
  • Upload date:
  • Size: 19.2 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.17.tar.gz
Algorithm Hash digest
SHA256 4cfeb9984542b649875621cdadd5b7dd831134e11cd8286856daba8334fdc955
MD5 45b86870546372d1c634e0db692fb151
BLAKE2b-256 a44223c92c678ff5cec29f2f84d2d93c3a422583297ab0d4ba2e478648fd779d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: blackduck-0.0.17-py3-none-any.whl
  • Upload date:
  • Size: 17.4 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.17-py3-none-any.whl
Algorithm Hash digest
SHA256 04088afa8263ea6979ca16578b65a8efe5b668884396d120ff2e701804601a7a
MD5 e206a47b9cc31c64ba712f4105863992
BLAKE2b-256 98ca321f1f0b3f8af8975b3f21ee7fd9bc6f8511be538768ce6a8f46802f5b20

See more details on using hashes here.

Release history Release notifications | RSS feed

1.1.3

2 files

1.1.0

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.0.56

2 files

0.0.55

2 files

0.0.54

2 files

0.0.53

2 files

0.0.52

2 files

0.0.51

2 files

0.0.50

2 files

0.0.49

2 files

0.0.48

2 files

0.0.47

2 files

0.0.46

2 files

0.0.45

2 files

0.0.44

2 files

0.0.43

2 files

0.0.42

2 files

0.0.41

2 files

0.0.40

2 files

0.0.39

2 files

0.0.38

2 files

0.0.37

2 files

0.0.36

2 files

0.0.35

2 files

0.0.34

2 files

0.0.33

2 files

0.0.32

2 files

0.0.31

2 files

0.0.30

2 files

0.0.29

2 files

0.0.28

2 files

0.0.27

2 files

0.0.26

2 files

0.0.25

2 files

0.0.24

2 files

0.0.23

2 files

0.0.22

2 files

0.0.21

2 files

0.0.20

2 files

0.0.19

2 files

0.0.18

2 files

This release

0.0.17 This release

2 files

0.0.16

2 files

0.0.15

2 files

0.0.14

2 files

0.0.12

2 files

0.0.11

2 files

0.0.10

2 files

0.0.9

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page