You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hub-rest-api-python provides Python bindings for Hub REST API.
4
4
5
-
:warning:Recently CVE-2020- 27589, a medium severity security defect, was discovered in the [blackduck PyPi](https://pypi.org/project/blackduck/) library which affects versions 0.0.25 – 0.0.52 that could suppress certificate validation if the calling code used either the upload_scan or download_project_scans methods. These methods did not enforce certificate validation. Other methods in the library are not affected. The defect was fixed in version 0.0.53.
5
+
:warning:Recently [CVE-2020-27589](https://nvd.nist.gov/vuln/detail/CVE-2020-27589), a medium severity security defect,
6
+
was discovered in the [blackduck PyPi](https://pypi.org/project/blackduck) library which affects versions 0.0.25 – 0.0.52
7
+
that could suppress certificate validation if the calling code used either the upload_scan or download_project_scans
8
+
methods. These methods did not enforce certificate validation. Other methods in the library are not affected.
9
+
The defect was fixed in version 0.0.53.
6
10
7
-
Customers using the [blackduck library](https://pypi.org/project/blackduck/) should upgrade to version 0.0.53, or later, to implement the fix.
11
+
Customers using the [blackduck library](https://pypi.org/project/blackduck) should upgrade to version 0.0.53, or later, to implement the fix.
8
12
9
-
## To use ##
13
+
# New in 1.0.0
14
+
15
+
Introducing the new Client class.
16
+
17
+
In order to provide a more robust long-term connection, faster performance, and an overall better experience a new
18
+
Client class has been designed.
19
+
20
+
It is backed by a [Requests session](https://docs.python-requests.org/en/master/user/advanced/#session-objects)
21
+
object. The user specifies a base URL, timeout, retries, proxies, and TLS verification upon initialization and these
22
+
attributes are persisted across all requests.
23
+
24
+
At the REST API level, the Client class provides a consistent way to discover and traverse public resources, uses a
25
+
[generator](https://wiki.python.org/moin/Generators) to fetch all items using pagination, and automatically renews
26
+
the bearer token.
27
+
28
+
To read more about the new Client class see the [Client User Guide](https://github.com/blackducksoftware/hub-rest-api-python/wiki/Client-User-Guide)
29
+
on the [Hub REST API Python Wiki](https://github.com/blackducksoftware/hub-rest-api-python/wiki).
30
+
31
+
### Important Note
32
+
The old HubInstance (in HubRestApi.py) keeps its existing functionality for backwards compatibility and therefore does
33
+
**not** currently leverage any of the new features in the Client class.
34
+
35
+
We believe that the new features are compelling enough to strongly encourage users to consider moving from HubInstance
36
+
to Client. Please give it a try and let us know what you think!
@@ -35,57 +63,24 @@ for project in bd.get_resource(name='projects'):
35
63
36
64
### Examples
37
65
38
-
Example code showing how to do various things can be found in the *examples* folder.
39
-
40
-
## Build ##
41
-
42
-
You should be using [virtualenv](https://pypi.org/project/virtualenv/), [virtrualenvwrapper](https://virtualenvwrapper.readthedocs.io/en/latest/) to make things easy on yourself.
66
+
Example code showing how to work with the new Client can be found in the *examples/client* folder.
Documentation for hub-rest-api-python can be found on the base project: [Hub REST API Python Wiki](https://github.com/blackducksoftware/hub-rest-api-python/wiki)
121
-
122
-
106
+
Documentation for hub-rest-api-python can be found on the base project:
107
+
[Hub REST API Python Wiki](https://github.com/blackducksoftware/hub-rest-api-python/wiki)
0 commit comments