Giter Club home page Giter Club logo

hub-rest-api-python's Introduction

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 [email protected] or [email protected] 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

hub-rest-api-python's People

Contributors

mkumykov avatar gsnyder2007 avatar ericatpure avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.